Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Number of replicas for each node Replicas int // Hash function to use Hash hash.Hash }
Options represents the options for the hash ring
type Ring ¶
type Ring[T any] struct { // contains filtered or unexported fields }
Ring represents the consistent hash ring
func NewWithOptions ¶
Creates a new Ring with options
func (*Ring[T]) AllItems ¶
func (r *Ring[T]) AllItems() []T
AllItems returns all the items in the ring
Click to show internal directories.
Click to hide internal directories.