MCPcopy Create free account
hub / github.com/efficientgo/e2e / InternalEndpoint

Method InternalEndpoint

env_docker.go:531–539  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
531func (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.
542func dockerNetworkContainerHost(networkName, containerName string) string {

Callers

nothing calls this directly

Calls 2

NameMethod · 0.95

Tested by

no test coverage detected