Documentation ¶
Overview ¶
Package partitioner provides the Partitioner type, which provides helper methods for determining partitions based on string keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Partitioner ¶
type Partitioner struct{}
Partitioner encapsulates helper methods for determining partitions
func NewPartitioner ¶
func NewPartitioner() *Partitioner
NewPartitioner returns a new instance of Partitioner with default values.
func (*Partitioner) PartitionsForKeys ¶
func (p *Partitioner) PartitionsForKeys(tkey dax.TableKey, partitionN int, keys ...string) map[dax.PartitionNum][]string
PartitionsForKeys returns a map of partitions to the list of strings which fall into that partition.
func (*Partitioner) ShardToPartition ¶
func (p *Partitioner) ShardToPartition(tkey dax.TableKey, shard dax.ShardNum, partitionN int) dax.PartitionNum
ShardToPartition returns the PartitionNum for the given shard.
Click to show internal directories.
Click to hide internal directories.