supervisor

package
v0.8.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Clock timetools.TimeProvider
	Files []*proxy.FileDescriptor
}

type Supervisor

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

Supervisor watches changes to the dynamic backends and applies those changes to the server in real time. Supervisor handles lifetime of the proxy as well, and does graceful restarts and recoveries in case of failures.

func New

func New(newProxy proxy.NewProxyFn, engine engine.Engine, errorC chan error, options Options) *Supervisor

func (*Supervisor) BackendStats

func (s *Supervisor) BackendStats(key engine.BackendKey) (*engine.RoundTripStats, error)

func (*Supervisor) FrontendStats

func (s *Supervisor) FrontendStats(key engine.FrontendKey) (*engine.RoundTripStats, error)

func (*Supervisor) GetFiles

func (s *Supervisor) GetFiles() ([]*proxy.FileDescriptor, error)

func (*Supervisor) ServerStats

func (s *Supervisor) ServerStats(key engine.ServerKey) (*engine.RoundTripStats, error)

func (*Supervisor) Start

func (s *Supervisor) Start() error

func (*Supervisor) Stop

func (s *Supervisor) Stop(wait bool)

func (*Supervisor) String

func (s *Supervisor) String() string

func (*Supervisor) TopFrontends

func (s *Supervisor) TopFrontends(key *engine.BackendKey) ([]engine.Frontend, error)

TopFrontends returns locations sorted by criteria (faulty, slow, most used) if hostname or backendId is present, will filter out locations for that host or backendId

func (*Supervisor) TopServers

func (s *Supervisor) TopServers(key *engine.BackendKey) ([]engine.Server, error)

TopServers returns endpoints sorted by criteria (faulty, slow, mos used) if backendId is not empty, will filter out endpoints for that backendId

Jump to

Keyboard shortcuts

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