Versions in this module Expand all Collapse all v0 v0.4.4 Mar 3, 2023 Changes in this version + const TopWeight + func Hash(data []byte) uint64 + func HmacSha256(key, data []byte) []byte + func Md5(data []byte) []byte + func Md5HexBytes(data []byte) string + func Md5HexString(data string) string + func Sha1(data []byte) []byte + func Sha1HexBytes(data []byte) string + func Sha1HexString(data string) string + func Sha256(data []byte) []byte + type ConsistentHash struct + func NewConsistentHash() *ConsistentHash + func NewCustomConsistentHash(replicas int, fn HashFunc) *ConsistentHash + func (h *ConsistentHash) Add(node any) + func (h *ConsistentHash) AddWithReplicas(node any, replicas int) + func (h *ConsistentHash) AddWithWeight(node any, weight int) + func (h *ConsistentHash) Get(v any) (any, bool) + func (h *ConsistentHash) Remove(node any) + type HashFunc func(data []byte) uint64