()
| 549 | } |
| 550 | |
| 551 | func (d *dockerRunnable) Ready() error { |
| 552 | if !d.IsRunning() { |
| 553 | return errors.Newf("service %s is stopped", d.Name()) |
| 554 | } |
| 555 | |
| 556 | // Ensure the service has a readiness probe configure. |
| 557 | if d.opts.Readiness == nil { |
| 558 | return nil |
| 559 | } |
| 560 | |
| 561 | return d.opts.Readiness.Ready(d) |
| 562 | } |
| 563 | |
| 564 | func (d *dockerRunnable) containerName() string { |
| 565 | return dockerNetworkContainerHost(d.usedNetworkName, d.Name()) |