MCPcopy
hub / github.com/grafana/dskit / GetInstancePort

Function GetInstancePort

ring/util.go:33–39  ·  view source on GitHub ↗

GetInstancePort returns the port to use to register the instance in the ring.

(configPort, listenPort int)

Source from the content-addressed store, hash-verified

31// GetInstancePort returns the port to use to register the instance
32// in the ring.
33func GetInstancePort(configPort, listenPort int) int {
34 if configPort > 0 {
35 return configPort
36 }
37
38 return listenPort
39}
40
41// WaitInstanceState waits until the input instanceID is registered within the
42// ring matching the provided state. A timeout should be provided within the context.

Callers 1

NewLifecyclerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected