func (ch *ConsistentHash) Buckets() (buckets []string) {
	ch.mu.RLock()
	defer ch.mu.RUnlock()

	for bucket := range ch.buckets {
		buckets = append(buckets, bucket)
	}
	sort.Strings(buckets)
	return
}
// Buckets returns the buckets.
//
// Calling `Buckets` is safe to do concurrently and acquires
// a read lock on the consistent hash reference.
Buckets returns the buckets.

Calling `Buckets` is safe to do concurrently and acquires
a read lock on the consistent hash reference.
// Buckets returns the buckets . // // Calling ` Buckets ` is safe to do concurrently and acquires // a read lock on the consistent hash reference .
func (ch *ConsistentHash) Buckets() (buckets []string) {
	ch.mu.RLock()
	defer ch.mu.RUnlock()
	for bucket := range ch.buckets {
		buckets = append(buckets, bucket)
	}
	sort.Strings(buckets)
	return
}
func ( ch * ConsistentHash ) Buckets ( ) ( buckets [ ] string ) { ch . mu . RLock ( ) defer ch . mu . RUnlock ( ) for bucket := range ch . buckets { buckets = append ( buckets , bucket ) } sort . Strings ( buckets ) return }
Buckets returns the buckets.
Buckets returns the buckets .