MCPcopy Create free account
hub / github.com/cortexproject/cortex / TokensFor

Method TokensFor

pkg/ring/model.go:121–125  ·  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

119// TokensFor return all ring tokens and tokens for the input provided ID.
120// Returned tokens are guaranteed to be sorted.
121func (d *Desc) TokensFor(id string) (myTokens, allTokens Tokens) {
122 allTokens = d.GetTokens()
123 myTokens = d.Ingesters[id].Tokens
124 return
125}
126
127// GetRegisteredAt returns the timestamp when the instance has been registered to the ring
128// or a zero value if unknown.

Callers 6

verifyTokensMethod · 0.95
autoJoinMethod · 0.95
TestDesc_TokensForFunction · 0.80
initRingMethod · 0.80
RenewTokensMethod · 0.80
verifyTokensMethod · 0.80

Calls 1

GetTokensMethod · 0.95

Tested by 1

TestDesc_TokensForFunction · 0.64