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

Method InstancesCount

ring/lifecycler.go:490–495  ·  view source on GitHub ↗

InstancesCount returns the total number of instances in the ring, updated during the last heartbeat period.

()

Source from the content-addressed store, hash-verified

488
489// InstancesCount returns the total number of instances in the ring, updated during the last heartbeat period.
490func (i *Lifecycler) InstancesCount() int {
491 i.countersLock.RLock()
492 defer i.countersLock.RUnlock()
493
494 return i.instancesCount
495}
496
497// ReadOnlyInstancesCount returns the total number of instances in the ring that are read only, updated during the last heartbeat period.
498func (i *Lifecycler) ReadOnlyInstancesCount() int {

Callers 1

Calls

no outgoing calls

Tested by 1