Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoalescingDispatcher ¶
type CoalescingDispatcher interface { CoalescingDispatch(key1, key2 string, n int) []string MaxBits() int }
CoalescingDispatcher selects a destination based on the first n bits of each key in a key pair.
For any given CoalescingDispatcher state, the destination chosen for a given pair of keys at a given bit depth will be stable.
For any given CoalescingDispatcher state, the destination chosen for with n equal to zero will be stable, regardless of the values of the keys.
func Coalesce ¶
func Coalesce(d Dispatcher) CoalescingDispatcher
Coalesce returns a CoalescingDispatcher for a given Dispatcher.
type Dispatcher ¶
Dispatcher selects destinations for a given value i.
For any given Dispatcher state, the destinations chosen for a given value of i will be stable.
type StringDispatcher ¶
type StringDispatcher interface { Dispatcher DispatchString(s string) []string }
func ByString ¶
func ByString(d Dispatcher) StringDispatcher
Click to show internal directories.
Click to hide internal directories.