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

Function getZones

pkg/ring/util.go:131–140  ·  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

129// getZones return the list zones from the provided tokens. The returned list
130// is guaranteed to be sorted.
131func getZones(tokens map[string][]uint32) []string {
132 var zones []string
133
134 for zone := range tokens {
135 zones = append(zones, zone)
136 }
137
138 sort.Strings(zones)
139 return zones
140}
141
142// searchToken returns the offset of the tokens entry holding the range for the provided key.
143func searchToken(tokens []uint32, key uint32) int {

Calls

no outgoing calls