Documentation ¶
Index ¶
- func Hash(key string) uint32
- type HashRing
- func (h *HashRing[T]) Add(slots ...Slot[T])
- func (h *HashRing[T]) Count() int
- func (h *HashRing[T]) ForEach(fn func(index int, hash uint32, value T))
- func (h *HashRing[T]) Get(key string) (Slot[T], bool)
- func (h *HashRing[T]) GetNext(s Slot[T]) Slot[T]
- func (h *HashRing[T]) GetPrev(s Slot[T]) Slot[T]
- func (h *HashRing[T]) Len() int
- func (h *HashRing[T]) Less(i, j int) bool
- func (h *HashRing[T]) Remove(keys ...string)
- func (h *HashRing[T]) Sort()
- func (h *HashRing[T]) Swap(i, j int)
- func (h *HashRing[T]) UnsortAdd(slots ...Slot[T])
- type Slot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.