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

Method Includes

pkg/ring/replication_set.go:111–119  ·  view source on GitHub ↗

Includes returns whether the replication set includes the replica with the provided addr.

(addr string)

Source from the content-addressed store, hash-verified

109
110// Includes returns whether the replication set includes the replica with the provided addr.
111func (r ReplicationSet) Includes(addr string) bool {
112 for _, instance := range r.Instances {
113 if instance.GetAddr() == addr {
114 return true
115 }
116 }
117
118 return false
119}
120
121// GetAddresses returns the addresses of all instances within the replication set. Returned slice
122// order is not guaranteed.

Calls 1

GetAddrMethod · 0.80