Versions in this module Expand all Collapse all v0 v0.0.1 Dec 10, 2019 Changes in this version + type Shard interface + ID func() int + NodeID func() string + SetNodeID func(nodeID string) + Weight func() int + func NewShard(id, weight int) Shard + type ShardFunc func(interface{}) int + func NewIntSharder(max int64) ShardFunc + func NewStringSharder(max int) ShardFunc + type ShardMap interface + Init func(maxShards int, weights []int) error + MapToNode func(shardID int) Shard + NodeList func() []string + ShardCount func() int + ShardCountForNode func(nodeid string) int + Shards func() []Shard + TotalWeight func() int + UpdateNodes func(nodeID ...string) + func NewShardMap() ShardMap