Registry / utility / stathat-consistent

stathat-consistent

JSON →
library1.0.0gogounverified

Package consistent provides a consistent hashing function for distributing keys across nodes.

go get github.com/stathat/consistent
INSTALL
IMPORT
SIG · STATHAT-CONSISTENT
S
stathat-consistent
utilitygov1.0.0
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.

consistent
✓ github.com/stathat/consistent

Create a consistent hash ring and map a key to a node.

package main import ( "fmt" "github.com/stathat/consistent" ) func main() { c := consistent.New() c.Add("node1") c.Add("node2") key, err := c.Get("mykey") if err != nil { panic(err) } fmt.Println("Key maps to:", key) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
stathat-consistent — go get stathat-consistent · libregistry