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

Function NewRandomTokenGeneratorWithSeed

ring/token_generator.go:34–36  ·  view source on GitHub ↗
(seed int64)

Source from the content-addressed store, hash-verified

32}
33
34func NewRandomTokenGeneratorWithSeed(seed int64) *RandomTokenGenerator {
35 return &RandomTokenGenerator{r: rand.New(rand.NewSource(seed))}
36}
37
38// GenerateTokens generates at most requestedTokensCount unique random tokens, none of which clashes with
39// the given allTakenTokens, representing the set of all tokens currently present in the ring.

Calls

no outgoing calls