getZones return the list zones from the provided tokens. The returned list is guaranteed to be sorted.
(tokens map[string][]uint32)
| 116 | // getZones return the list zones from the provided tokens. The returned list |
| 117 | // is guaranteed to be sorted. |
| 118 | func 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. |
| 130 | func searchToken(tokens []uint32, key uint32) int { |
no outgoing calls