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

Method getTokensInfo

ring/model.go:477–492  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

475}
476
477func (d *Desc) getTokensInfo() map[uint32]instanceInfo {
478 out := map[uint32]instanceInfo{}
479
480 for instanceID, instance := range d.Ingesters {
481 info := instanceInfo{
482 InstanceID: instanceID,
483 Zone: instance.Zone,
484 }
485
486 for _, token := range instance.Tokens {
487 out[token] = info
488 }
489 }
490
491 return out
492}
493
494// GetTokens returns sorted list of tokens owned by all instances within the ring.
495func (d *Desc) GetTokens() []uint32 {

Calls

no outgoing calls