Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdaptive ¶ added in v1.1.0
func NewAdaptive(dials []proxyclient.Dial) proxyclient.Dial
NewAdaptive creates a Dial that tracks success/failure/latency per node and routes traffic to the best-performing nodes.
func NewHash ¶
func NewHash(proxies []proxyclient.Dial) proxyclient.Dial
func NewRandom ¶
func NewRandom(proxies []proxyclient.Dial) proxyclient.Dial
func NewRoundRobin ¶
func NewRoundRobin(proxies []proxyclient.Dial) proxyclient.Dial
Types ¶
type Tracker ¶ added in v1.1.0
type Tracker struct {
// contains filtered or unexported fields
}
Tracker wraps a set of Dials with dead-node detection. Nodes that fail consecutively are temporarily removed from rotation.
func NewTracker ¶ added in v1.1.0
func NewTracker(dials []proxyclient.Dial) *Tracker
func (*Tracker) AliveIndices ¶ added in v1.1.0
AliveIndices returns indices of nodes currently considered alive.
Click to show internal directories.
Click to hide internal directories.