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

Method GenerateTokens

ring/token_generator.go:14–14  ·  ring/token_generator.go::TokenGenerator.GenerateTokens

GenerateTokens generates at most requestedTokensCount unique tokens, none of which clashes with the given allTakenTokens, representing the set of all tokens currently present in the ring. Generated tokens are sorted.

(requestedTokensCount int, allTakenTokens []uint32)

Source from the content-addressed store, hash-verified

12 // the given allTakenTokens, representing the set of all tokens currently present in the ring.
13 // Generated tokens are sorted.
14 GenerateTokens(requestedTokensCount int, allTakenTokens []uint32) Tokens
15
16 // CanJoin checks whether the instance owning this TokenGenerator can join the set of the given instances satisfies,
17 // and fails if it is not possible.

Implementers 2

RandomTokenGeneratorring/token_generator.go
SpreadMinimizingTokenGeneratorring/spread_minimizing_token_generator

Calls

no outgoing calls