Versions in this module Expand all Collapse all v0 v0.1.0 Aug 25, 2026 Changes in this version + var ErrBadCount = errors.New("hrw: negative count") + var ErrBadEpsilon = errors.New("hrw: epsilon must be >= 0") + var ErrBadWeights = errors.New("hrw: weights must be positive") + var ErrEmptyNodes = errors.New("hrw: empty node list") + func Assign(keys, nodes []string, opts ...Option) (map[string]string, error) + func Owner(key string, nodes []string, opts ...Option) (string, error) + func OwnerW(key string, nodes []WeightedNode, opts ...Option) (string, error) + func Owners(key string, nodes []string, n int, opts ...Option) ([]string, error) + type Option func(*config) + func WithClusterSize(n int) Option + func WithEpsilon(e float64) Option + func WithFanout(n int) Option + type Skeleton struct + func Build(nodes []string, opts ...Option) (*Skeleton, error) + func BuildW(nodes []WeightedNode, opts ...Option) (*Skeleton, error) + func (s *Skeleton) Owner(key string) (string, error) + type Weighted struct + type WeightedNode struct + Node string + Weight int