Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get implements a basic shuffle shard algorithm. Given a specified number of underlying items, it hashes the provided key and uses the resulting hash to select a number of items specified by the count parameter.
For a given hash key, the same shard of items will always be selected.
For two different hash keys and appropriate values of items and count, a fully overlapping set of items is unlikely. The probability of a full collision between any two keys is roughly 1/(items choose count).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.