wrr

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer

type Balancer struct {
	// contains filtered or unexported fields
}

Balancer is a WeightedRoundRobin load balancer.

func New

func New(sticky *dynamic.Sticky) *Balancer

New creates a new load balancer.

func (*Balancer) AddService

func (b *Balancer) AddService(name string, handler http.Handler, weight *int)

AddService adds a handler. It is not thread safe with ServeHTTP.

func (*Balancer) ServeHTTP

func (b *Balancer) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL