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

Method TokensFor

ring/model.go:136–140  ·  view source on GitHub ↗

TokensFor return all ring tokens and tokens for the input provided ID. Returned tokens are guaranteed to be sorted.

(id string)

Source from the content-addressed store, hash-verified

134// TokensFor return all ring tokens and tokens for the input provided ID.
135// Returned tokens are guaranteed to be sorted.
136func (d *Desc) TokensFor(id string) (myTokens, allTokens Tokens) {
137 allTokens = d.GetTokens()
138 myTokens = d.Ingesters[id].Tokens
139 return
140}
141
142// GetRegisteredAt returns the timestamp when the instance has been registered to the ring
143// or a zero value if unknown.

Callers 4

autoJoinMethod · 0.95
TestDesc_TokensForFunction · 0.80
verifyTokensMethod · 0.80
verifyTokensMethod · 0.80

Calls 1

GetTokensMethod · 0.95

Tested by 1

TestDesc_TokensForFunction · 0.64