NetworkContainerHost return the hostname of the container within the network. This is the address a container should use to connect to other containers.
(networkName, containerName string)
| 386 | // NetworkContainerHost return the hostname of the container within the network. This is |
| 387 | // the address a container should use to connect to other containers. |
| 388 | func NetworkContainerHost(networkName, containerName string) string { |
| 389 | return fmt.Sprintf("%s-%s", networkName, containerName) |
| 390 | } |
| 391 | |
| 392 | // NetworkContainerHostPort return the host:port address of a container within the network. |
| 393 | func NetworkContainerHostPort(networkName, containerName string, port int) string { |
no outgoing calls
no test coverage detected