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/buraksezer/consistent
Locate a key in a consistent hash ring
package main
import (
"fmt"
"github.com/buraksezer/consistent"
)
func main() {
cfg := consistent.Config{
PartitionCount: 7,
ReplicationFactor: 20,
Load: 1.25,
}
c := consistent.New(nil, cfg)
c.Add(consistent.Member("node1"))
key := c.LocateKey([]byte("mykey"))
fmt.Println(key)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.10.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.