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

Method Includes

ring/replication_set.go:515–523  ·  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

513
514// Includes returns whether the replication set includes the replica with the provided addr.
515func (r ReplicationSet) Includes(addr string) bool {
516 for _, instance := range r.Instances {
517 if instance.GetAddr() == addr {
518 return true
519 }
520 }
521
522 return false
523}
524
525// GetIDs returns the IDs of all instances within the replication set. Returned slice
526// order is not guaranteed.

Calls 1

GetAddrMethod · 0.80