Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy interface { List(policy ...interface{}) []interface{} String() string }
Policy defines a policy we use for selecting upstreams.
type Random ¶
type Random struct{}
Random is a policy that implements random upstream selection.
type RoundRobin ¶
type RoundRobin struct {
// contains filtered or unexported fields
}
RoundRobin is a policy that selects hosts based on round robin ordering.
func (*RoundRobin) List ¶
func (r *RoundRobin) List(p ...interface{}) []interface{}
List returns a set of proxies to be used for this client depending on RoundRobin policy.
func (*RoundRobin) String ¶
func (r *RoundRobin) String() string
String returns the name of policy RoundRobin
type Sequential ¶
type Sequential struct{}
Sequential is a policy that selects hosts based on sequential ordering.
func (*Sequential) List ¶
func (r *Sequential) List(p ...interface{}) []interface{}
List returns a set of proxies without filter.
func (*Sequential) String ¶
func (r *Sequential) String() string
String returns the name of policy Sequential
Click to show internal directories.
Click to hide internal directories.