MCPcopy Create free account
hub / github.com/cortexproject/cortex / NetworkEndpointFor

Method NetworkEndpointFor

integration/e2e/service.go:247–249  ·  view source on GitHub ↗

NetworkEndpointFor returns internal service endpoint (host:port) for given internal port and network. Internal means that it will be accessible only from docker containers within the given network. If you configure your local resolver with docker DNS namespace you can access it from host as well. T

(networkName string, port int)

Source from the content-addressed store, hash-verified

245//
246// This method return correct endpoint for the service in any state.
247func (s *ConcreteService) NetworkEndpointFor(networkName string, port int) string {
248 return fmt.Sprintf("%s:%d", NetworkContainerHost(networkName, s.name), port)
249}
250
251func (s *ConcreteService) SetReadinessProbe(probe ReadinessProbe) {
252 s.readiness = probe

Callers 2

NetworkEndpointMethod · 0.95

Calls 1

NetworkContainerHostFunction · 0.85

Tested by

no test coverage detected