package
Version:
v0.10.0
Opens a new window with list of versions in this module.
Published: Aug 10, 2025
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package consistenthash provides an implementation of consistent hashing.
HashFunc is a function type that implements the Hasher interface.
Hash implements the Hasher interface for HashFunc.
Hasher defines an interface for hash functions that produce uint32 values.
type Map struct {
Hasher Hasher
}
Map implements consistent hashing ring.
Add adds some keys to the hash.
Get gets the closest item in the hash to the provided key.
Returns true if there are no items available.
ReadFrom implements io.ReaderFrom.
WriteTo implements io.WriterTo.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.