MCPcopy
hub / github.com/grafana/tempo / NewTokenHasher

Function NewTokenHasher

pkg/util/traceid.go:75–77  ·  view source on GitHub ↗

NewTokenHasher returns a new hash.Hash64 for use with TokenForID.

()

Source from the content-addressed store, hash-verified

73
74// NewTokenHasher returns a new hash.Hash64 for use with TokenForID.
75func NewTokenHasher() hash.Hash64 {
76 return fnv.New64()
77}
78
79// TokenForID returns a token for use as a key in a hash map given a span ID and span kind.
80// h and buffer (must be at least 4 bytes) are provided by the caller for reuse across calls

Callers 5

iterMethod · 0.92
TestTokenForIDCollisionFunction · 0.92
ConsumeWithFinalMethod · 0.92
TestTokenForIDFunction · 0.85
BenchmarkTokenForIDFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestTokenForIDCollisionFunction · 0.74
TestTokenForIDFunction · 0.68
BenchmarkTokenForIDFunction · 0.68