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

Function generateTokens

kv/memberlist/memberlist_client_test.go:1424–1432  ·  view source on GitHub ↗

avoid dependency on ring package

(numTokens int)

Source from the content-addressed store, hash-verified

1422
1423// avoid dependency on ring package
1424func generateTokens(numTokens int) []uint32 {
1425 var tokens []uint32
1426 for i := 0; i < numTokens; {
1427 candidate := rand.Uint32()
1428 tokens = append(tokens, candidate)
1429 i++
1430 }
1431 return tokens
1432}
1433
1434type distributedCounter map[string]int
1435

Callers 3

updateFnFunction · 0.85
TestCASNoChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected