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

Method readOnlyInstanceCount

ring/ring.go:1534–1544  ·  view source on GitHub ↗

readOnlyInstanceCount returns the number of read only instances in the ring.

()

Source from the content-addressed store, hash-verified

1532
1533// readOnlyInstanceCount returns the number of read only instances in the ring.
1534func (r *Ring) readOnlyInstanceCount() int {
1535 r.mtx.RLock()
1536 c := 0
1537 for _, i := range r.ringDesc.Ingesters {
1538 if i.ReadOnly {
1539 c++
1540 }
1541 }
1542 r.mtx.RUnlock()
1543 return c
1544}
1545
1546// Operation describes which instances can be included in the replica set, based on their state.
1547//

Callers 1

Calls

no outgoing calls

Tested by 1