Versions in this module Expand all Collapse all v0 v0.10.0 Nov 9, 2022 Changes in this version + const DefaultLoad + const DefaultPartitionCount + const DefaultReplicationFactor v0.9.0 Apr 24, 2021 Changes in this version + var ErrInsufficientMemberCount = errors.New("insufficient member count") + var ErrMemberNotFound = errors.New("member could not be found in ring") + type Config struct + Hasher Hasher + Load float64 + PartitionCount int + ReplicationFactor int + type Consistent struct + func New(members []Member, config Config) *Consistent + func (c *Consistent) Add(member Member) + func (c *Consistent) AverageLoad() float64 + func (c *Consistent) FindPartitionID(key []byte) int + func (c *Consistent) GetClosestN(key []byte, count int) ([]Member, error) + func (c *Consistent) GetClosestNForPartition(partID, count int) ([]Member, error) + func (c *Consistent) GetMembers() []Member + func (c *Consistent) GetPartitionOwner(partID int) Member + func (c *Consistent) LoadDistribution() map[string]float64 + func (c *Consistent) LocateKey(key []byte) Member + func (c *Consistent) Remove(name string) + type Hasher interface + Sum64 func([]byte) uint64 + type Member interface + String func() string