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

Function shardByUser

pkg/distributor/distributor.go:584–588  ·  view source on GitHub ↗
(userID string)

Source from the content-addressed store, hash-verified

582}
583
584func shardByUser(userID string) uint32 {
585 h := ingester_client.HashNew32()
586 h = ingester_client.HashAdd32(h, userID)
587 return h
588}
589
590// This function generates different values for different order of same labels.
591func shardByAllLabels(userID string, labels []cortexpb.LabelAdapter) uint32 {

Callers 3

tokenForMetadataMethod · 0.85
shardByMetricNameFunction · 0.85
shardByAllLabelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected