Registry / utility / dgryski-go-rendezvous

dgryski-go-rendezvous

JSON →
library0.0.0-20200823014737-9f7001d12a5fgogounverified

Package rendezvous provides a consistent hashing implementation using the rendezvous algorithm.

go get github.com/dgryski/go-rendezvous
INSTALL
IMPORT
SIG · DGRYSKI-GO-RENDEZV
D
dgryski-go-rendezvous
utilitygov0.0.0-20200823014737-9f7001d12a5f
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rendezvous
✓ github.com/dgryski/go-rendezvous

Demonstrates consistent hashing with rendezvous algorithm.

package main import ( "fmt" "github.com/dgryski/go-rendezvous" ) func main() { nodes := []string{"node1", "node2", "node3"} hash := rendezvous.New() for _, key := range []string{"key1", "key2", "key3"} { node := hash.Lookup(key, nodes) fmt.Printf("%s -> %s\n", key, node) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20200823014737-9f7001d12a5flatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
dgryski-go-rendezvous — go get dgryski-go-rendezvous · libregistry