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

Function getZones

ring/util.go:118–127  ·  view source on GitHub ↗

getZones return the list zones from the provided tokens. The returned list is guaranteed to be sorted.

(tokens map[string][]uint32)

Source from the content-addressed store, hash-verified

116// getZones return the list zones from the provided tokens. The returned list
117// is guaranteed to be sorted.
118func getZones(tokens map[string][]uint32) []string {
119 var zones []string
120
121 for zone := range tokens {
122 zones = append(zones, zone)
123 }
124
125 sort.Strings(zones)
126 return zones
127}
128
129// searchToken returns the offset of the tokens entry holding the range for the provided key.
130func searchToken(tokens []uint32, key uint32) int {

Calls

no outgoing calls