Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotHandler = fmt.Errorf("error not handler")
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Policy LoadBalancePolicyEnum `json:",omitempty"` Handlers []*Weight }
type LoadBalancePolicyEnum ¶
type LoadBalancePolicyEnum string
const ( EnumRoundRobin LoadBalancePolicyEnum = "round_robin" EnumRandom LoadBalancePolicyEnum = "random" )
type RoundRobin ¶
type RoundRobin struct {
// contains filtered or unexported fields
}
func NewRoundRobin ¶
func NewRoundRobin(handlers []http.Handler) *RoundRobin
func (*RoundRobin) ServeHTTP ¶
func (r *RoundRobin) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.