Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashRing ¶
func NewHashRing ¶
Instantiate a new Hash Ring You can define your own hash function or pass nil to use the default one: sha1
func (*HashRing[T]) AddNode ¶
func (hr *HashRing[T]) AddNode(node T)
Add a node to the hash ring The node parameter is a defined node type (must implement Stringer interface)
func (*HashRing[T]) RemoveNode ¶
Remove a node from the hash ring Returns an error in case the node is not found The node parameter is a defined node type (must implement Stringer interface)
Click to show internal directories.
Click to hide internal directories.