Versions in this module Expand all Collapse all v0 v0.0.1 Aug 22, 2026 Changes in this version + type BasicRoundRobin struct + func NewBasicRoundRobin[T Target](targets ...T) *BasicRoundRobin[T] + func (lb *BasicRoundRobin[T]) Add(targets ...T) + func (lb *BasicRoundRobin[T]) Get(_ uint64) (t T, found bool) + func (lb *BasicRoundRobin[T]) Remove(id uint64) + func (lb *BasicRoundRobin[T]) Targets() []T + type DirectHash struct + func NewDirectHash[T Target](targets ...T) *DirectHash[T] + func (lb *DirectHash[T]) Add(targets ...T) + func (lb *DirectHash[T]) Get(key uint64) (t T, found bool) + func (lb *DirectHash[T]) Remove(id uint64) + func (lb *DirectHash[T]) Targets() []T + func (lb *DirectHash[T]) WithMaxRetry(i int) + type DirectHashW struct + func NewDirectHashW[T Target](targets ...T) *DirectHashW[T] + func (lb *DirectHashW[T]) Add(targets ...T) + func (lb *DirectHashW[T]) Get(key uint64) (t T, found bool) + func (lb *DirectHashW[T]) Remove(id uint64) + func (lb *DirectHashW[T]) Targets() []T + type JumpHash struct + func NewJumpHash[T Target](targets ...T) *JumpHash[T] + func (lb *JumpHash[T]) Add(targets ...T) + func (lb *JumpHash[T]) Get(key uint64) (t T, found bool) + func (lb *JumpHash[T]) Remove(id uint64) + func (lb *JumpHash[T]) Targets() []T + func (lb *JumpHash[T]) WithMaxRetry(i int) + type LoadBalancer interface + Add func(targets ...T) + Get func(hint uint64) (t T, found bool) + Remove func(id uint64) + Targets func() (targets []T) + type Maglev struct + func NewMaglev[T Target](targets ...T) *Maglev[T] + func (lb *Maglev[T]) Add(targets ...T) + func (lb *Maglev[T]) Get(key uint64) (t T, found bool) + func (lb *Maglev[T]) Remove(id uint64) + func (lb *Maglev[T]) Targets() []T + func (lb *Maglev[T]) WithMaxRetry(i int) + func (lb *Maglev[T]) WithMinimumTableSize(i int) + type Priority struct + func NewPriority[T Target](targets ...T) *Priority[T] + func (lb *Priority[T]) Add(targets ...T) + func (lb *Priority[T]) Get(_ uint64) (t T, found bool) + func (lb *Priority[T]) Remove(id uint64) + func (lb *Priority[T]) Targets() []T + type Random struct + func NewRandom[T Target](targets ...T) *Random[T] + func (lb *Random[T]) Add(targets ...T) + func (lb *Random[T]) Get(_ uint64) (t T, found bool) + func (lb *Random[T]) Remove(id uint64) + func (lb *Random[T]) Targets() []T + func (lb *Random[T]) WithMaxRetry(i int) + type RandomW struct + func NewRandomW[T Target](targets ...T) *RandomW[T] + func (lb *RandomW[T]) Add(targets ...T) + func (lb *RandomW[T]) Get(_ uint64) (t T, found bool) + func (lb *RandomW[T]) Remove(id uint64) + func (lb *RandomW[T]) Targets() []T + type RendezvousHash struct + func NewRendezvousHash[T Target](targets ...T) *RendezvousHash[T] + func (lb *RendezvousHash[T]) Add(targets ...T) + func (lb *RendezvousHash[T]) Get(key uint64) (t T, found bool) + func (lb *RendezvousHash[T]) Remove(id uint64) + func (lb *RendezvousHash[T]) Targets() []T + type RingHash struct + func NewRingHash[T Target](targets ...T) *RingHash[T] + func (lb *RingHash[T]) Add(targets ...T) + func (lb *RingHash[T]) Get(key uint64) (t T, found bool) + func (lb *RingHash[T]) Remove(id uint64) + func (lb *RingHash[T]) Targets() []T + type RoundRobin struct + func NewRoundRobin[T Target](targets ...T) *RoundRobin[T] + func (lb *RoundRobin[T]) Add(targets ...T) + func (lb *RoundRobin[T]) Get(_ uint64) (t T, found bool) + func (lb *RoundRobin[T]) Remove(id uint64) + func (lb *RoundRobin[T]) Targets() []T + type Target interface + Active func() bool + ID func() uint64 + Weight func() uint16