InternalEndpoint returns internal service endpoint (host:port) for given internal port. Internal means that it will be accessible only from docker containers within the network that this service is running in. If you configure your local resolver with docker DNS namespace you can access it from host
(portName string)
| 529 | // service is running in. If you configure your local resolver with docker DNS namespace you can access it from host |
| 530 | // as well. Use `Endpoint` for host access. |
| 531 | func (d *dockerRunnable) InternalEndpoint(portName string) string { |
| 532 | // Map the port name to the container port. |
| 533 | port, ok := d.ports[portName] |
| 534 | if !ok { |
| 535 | return "" |
| 536 | } |
| 537 | |
| 538 | return dockerNetworkContainerHostPort(d.env.networkName, d.Name(), port) |
| 539 | } |
| 540 | |
| 541 | // dockerNetworkContainerHost return the host address of a container within the network. |
| 542 | func dockerNetworkContainerHost(networkName, containerName string) string { |
nothing calls this directly
no test coverage detected