Documentation ¶
Index ¶
Constants ¶
View Source
const ( BalancerTypeRR = "RR" BalancerTypeWRR = "WRR" BalancerTypeRandom = "RANDOM" BalancerTypeWRandom = "WRANDOM" BalancerTypeHash = "HASH" BalancerTypeCHash = "CHASH" )
Variables ¶
View Source
var (
ErrNoBalancer = errors.New("no balancer available")
)
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
func CreateBalancer ¶
func NewCHashBalancer ¶
func NewCHashBalancer(fs ...HashFunc64) Balancer
func NewHashBalancer ¶
func NewRRBalancer ¶
func NewRRBalancer() Balancer
func NewRandomBalancer ¶
func NewRandomBalancer() Balancer
func NewWRRBalancer ¶
func NewWRRBalancer() Balancer
func NewWRandomBalancer ¶
func NewWRandomBalancer() Balancer
type CHashBalancer ¶
type CHashBalancer struct {
// contains filtered or unexported fields
}
func (*CHashBalancer) Name ¶
func (b *CHashBalancer) Name() string
type HashBalancer ¶
type HashBalancer struct {
// contains filtered or unexported fields
}
func (*HashBalancer) Name ¶
func (b *HashBalancer) Name() string
type HashFunc64 ¶
type RRBalancer ¶
type RRBalancer struct { }
func (*RRBalancer) Name ¶
func (b *RRBalancer) Name() string
type RandomBalancer ¶
type RandomBalancer struct { }
func (*RandomBalancer) Name ¶
func (b *RandomBalancer) Name() string
type WRRBalancer ¶
type WRRBalancer struct { }
func (*WRRBalancer) Name ¶
func (b *WRRBalancer) Name() string
type WRandomBalancer ¶
type WRandomBalancer struct { }
func (*WRandomBalancer) Name ¶
func (b *WRandomBalancer) Name() string
Click to show internal directories.
Click to hide internal directories.