Documentation ¶
Index ¶
- type Options
- type Supervisor
- func (s *Supervisor) BackendStats(key engine.BackendKey) (*engine.RoundTripStats, error)
- func (s *Supervisor) FrontendStats(key engine.FrontendKey) (*engine.RoundTripStats, error)
- func (s *Supervisor) GetFiles() ([]*proxy.FileDescriptor, error)
- func (s *Supervisor) ServerStats(key engine.ServerKey) (*engine.RoundTripStats, error)
- func (s *Supervisor) Start() error
- func (s *Supervisor) Stop(wait bool)
- func (s *Supervisor) String() string
- func (s *Supervisor) TopFrontends(key *engine.BackendKey) ([]engine.Frontend, error)
- func (s *Supervisor) TopServers(key *engine.BackendKey) ([]engine.Server, error)
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
Click to show internal directories.
Click to hide internal directories.