Documentation ¶
Overview ¶
Package ringhash implementats a consistent ring hash: https://en.wikipedia.org/wiki/Consistent_hashing
Index ¶
Constants ¶
View Source
const (
// Init is what 32 bits hash values should be initialized with.
Init = offset32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
Ring is the definition of the ringhash.
func NewRing ¶
New initializes an empty ringhash with the given number of replicas and a hash function. If the hash function is nil, fnv.New32a() is used.
Click to show internal directories.
Click to hide internal directories.