Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancePolicy ¶
type BalancePolicy interface {
GetNext() *httputil.ReverseProxy
}
type LeastLatencyPolicy ¶
type LeastLatencyPolicy struct {
// contains filtered or unexported fields
}
func NewLeastLatencyPolicy ¶
func NewLeastLatencyPolicy(serversAndURLs []ServerAndWeight) *LeastLatencyPolicy
func (*LeastLatencyPolicy) GetNext ¶
func (llp *LeastLatencyPolicy) GetNext() *httputil.ReverseProxy
type RandomPolicy ¶
type RandomPolicy struct {
// contains filtered or unexported fields
}
func NewRandomPolicy ¶
func NewRandomPolicy(servers []ServerAndWeight) *RandomPolicy
func (*RandomPolicy) GetNext ¶
func (rp *RandomPolicy) GetNext() *httputil.ReverseProxy
type RoundRobinPolicy ¶
type RoundRobinPolicy struct {
// contains filtered or unexported fields
}
func NewRoundRobinPolicy ¶
func NewRoundRobinPolicy(servers []ServerAndWeight) *RoundRobinPolicy
func (*RoundRobinPolicy) GetNext ¶
func (rrp *RoundRobinPolicy) GetNext() *httputil.ReverseProxy
The servers provided must be provided in the same order for accurate results
type ServerAndWeight ¶
type ServerAndWeight struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.