Versions in this module Expand all Collapse all v0 v0.10.0 Apr 13, 2026 v0.9.0 Mar 1, 2026 Changes in this version + const DefaultReplicas + var ErrEmptyRing = errors.New("consistent: hash ring is empty") + var ErrNodeExists = errors.New("consistent: node already exists") + var ErrNodeNotFound = errors.New("consistent: node not found") + type Consistent struct + func New() *Consistent + func (c *Consistent) Add(nodeID string) error + func (c *Consistent) AddWithReplicas(nodeID string, replicas int) error + func (c *Consistent) Get(key string) (string, error) + func (c *Consistent) GetN(key string, n int) ([]string, error) + func (c *Consistent) IsEmpty() bool + func (c *Consistent) Nodes() []string + func (c *Consistent) Remove(nodeID string) error + func (c *Consistent) SetHashFunc(hashFunc func([]byte) uint32) *Consistent + func (c *Consistent) SetReplicas(replicas int) *Consistent