Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aperture ¶
type Aperture interface { // Next returns next selected item. Next() (interface{}, func(balancer.DoneInfo)) // Set logical aperture SetLogicalAperture(int) // Set local peer id SetLocalPeerID(string) // Set local peers. SetLocalPeers([]string) // Set remote peers. SetRemotePeers([]interface{}) }
Aperture support map local peers to remote peers to divide remote peers into subsets to separate services into small sets and reduce the total connections
type Picker ¶
type Picker interface { // Next returns next selected item. Next() (interface{}, func(balancer.DoneInfo)) // Add a weighted item. Add(interface{}, float64) // Reset this picker Reset() }
Picker supports multiple algorithms for load balance, uses the ideas behind the "power of 2 choices" to select two nodes from the underlying vector.
Click to show internal directories.
Click to hide internal directories.