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

Method GetAddresses

pkg/ring/replication_set.go:123–129  ·  view source on GitHub ↗

GetAddresses returns the addresses of all instances within the replication set. Returned slice order is not guaranteed.

()

Source from the content-addressed store, hash-verified

121// GetAddresses returns the addresses of all instances within the replication set. Returned slice
122// order is not guaranteed.
123func (r ReplicationSet) GetAddresses() []string {
124 addrs := make([]string, 0, len(r.Instances))
125 for _, desc := range r.Instances {
126 addrs = append(addrs, desc.Addr)
127 }
128 return addrs
129}
130
131// GetAddressesWithout returns the addresses of all instances within the replication set while
132// excluding the specified address. Returned slice order is not guaranteed.

Calls

no outgoing calls