Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewTopologyMap ¶
MustNewTopologyMap returns a new topology.Map with provided parameters. It's a utility method to make tests easier to write.
func ShardsRange ¶
ShardsRange returns a slice of shards for all ids between [from, to], with shard state `s`.
func Uint32Range ¶
Uint32Range returns a slice of all values between [from, to].
Types ¶
type TopologyView ¶
type TopologyView struct { HashFn sharding.HashFn Replicas int Assignment map[string][]shard.Shard }
TopologyView represents a snaphshot view of a topology.Map.
func NewTopologyView ¶
func NewTopologyView( replicas int, assignment map[string][]shard.Shard, ) TopologyView
NewTopologyView returns a new TopologyView with provided parameters. It's a utility method to make tests easier to write.
Click to show internal directories.
Click to hide internal directories.