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

Method writableInstancesWithTokensCount

ring/model.go:583–593  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

581}
582
583func (d *Desc) writableInstancesWithTokensCount() int {
584 writableInstancesWithTokensCount := 0
585 if d != nil {
586 for _, ingester := range d.Ingesters {
587 if len(ingester.Tokens) > 0 && !ingester.ReadOnly {
588 writableInstancesWithTokensCount++
589 }
590 }
591 }
592 return writableInstancesWithTokensCount
593}
594
595func (d *Desc) writableInstancesWithTokensCountPerZone() map[string]int {
596 instancesCountPerZone := map[string]int{}

Callers 2

buildRingForTheShardMethod · 0.95
setRingStateFromDescMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected