balancer

package
v0.0.0-...-12494cd Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: MIT Imports: 10 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
}

A Balancer stores structures used to compute the host to be used at runtime

func New

func New(c *config.Config, logger *zap.Logger, frontend string) (p *Balancer)

New returns a Balancer instance

func (*Balancer) Next

func (p *Balancer) Next() (server config.Server)

Next returns the next address according to the balancing algorithm

func (*Balancer) ServeHTTP

func (p *Balancer) ServeHTTP(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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