Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer interface {
Get() BalancerMedium
}
Balancer is an interface for algorithms that can balance loads around various media (`BalancerMedium`) Must be thread safe.
type BalancerMedium ¶
BalancerMedium is a medium for balancing, e.g. a http proxy, or another network interface to use.
type HTTPProxy ¶
type HTTPProxy struct {
// contains filtered or unexported fields
}
func NewHTTPProxy ¶
type NetworkAddress ¶
type NetworkAddress struct { }
type RoundRobin ¶
type RoundRobin struct {
// contains filtered or unexported fields
}
RoundRobin implements the Round Robin algorithm to return a new BalancerMedium.
func NewRoundRobinPool ¶
func NewRoundRobinPool(balancers []BalancerMedium) RoundRobin
func (*RoundRobin) Get ¶
func (p *RoundRobin) Get() BalancerMedium
Get retrieves, using the balancing algorithm, the next BalancerMedium.
Click to show internal directories.
Click to hide internal directories.