package consistenthash
import "github.com/golang/groupcache/consistenthash"
Package consistenthash provides an implementation of a ring hash.
Index ¶
Types ¶
type Hash ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func New ¶
func (*Map) Add ¶
Add adds some keys to the hash.
func (*Map) Get ¶
Get gets the closest item in the hash to the provided key.
func (*Map) IsEmpty ¶
IsEmpty returns true if there are no items available.
Source Files ¶
- Version
- v0.0.0-20241129210726-2c02b8208cf8 (latest)
- Published
- Nov 29, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 1 month ago –
Tools for package owners.