ConcreteService represents microservice with optional ports which will be discoverable from docker with : . For connecting from test, use `Endpoint` method. ConcreteService can be reused (started and stopped many time), but it can represent only one running container at the time.
| 32 | // ConcreteService can be reused (started and stopped many time), but it can represent only one running container |
| 33 | // at the time. |
| 34 | type ConcreteService struct { |
| 35 | name string |
| 36 | image string |
| 37 | networkPorts []int |
| 38 | env map[string]string |
| 39 | user string |
| 40 | command *Command |
| 41 | readiness ReadinessProbe |
| 42 | |
| 43 | // Maps container ports to dynamically binded local ports. |
| 44 | networkPortsContainerToLocal map[int]int |
| 45 | |
| 46 | // Generic retry backoff. |
| 47 | retryBackoff *backoff.Backoff |
| 48 | |
| 49 | // docker NetworkName used to start this container. |
| 50 | // If empty it means service is stopped. |
| 51 | usedNetworkName string |
| 52 | |
| 53 | // workDir is the working directory inside the container |
| 54 | workDir string |
| 55 | } |
| 56 | |
| 57 | func NewConcreteService( |
| 58 | name string, |
nothing calls this directly
no outgoing calls
no test coverage detected