Versions in this module Expand all Collapse all v0 v0.7.0 Dec 22, 2014 Changes in this version + const HTTP + const HTTPS + const TCP + const UNIX + type Address struct + Address string + Network string + func NewAddress(network, address string) (*Address, error) + func (a *Address) Equals(o Address) bool + type AlreadyExistsError struct + Message string + func (n *AlreadyExistsError) Error() string + type Anomaly struct + Code int + Message string + func (a Anomaly) String() string + type Backend interface + AddEndpoint func(*Endpoint) (*Endpoint, error) + AddHost func(*Host) (*Host, error) + AddHostListener func(hostname string, listener *Listener) (*Listener, error) + AddLocation func(*Location) (*Location, error) + AddLocationMiddleware func(hostname, locationId string, m *MiddlewareInstance) (*MiddlewareInstance, error) + AddUpstream func(*Upstream) (*Upstream, error) + Close func() + DeleteEndpoint func(upstreamId, id string) error + DeleteHost func(name string) error + DeleteHostListener func(hostname string, listenerId string) error + DeleteLocation func(hostname, id string) error + DeleteLocationMiddleware func(hostname, locationId, mType, id string) error + DeleteUpstream func(id string) error + GetEndpoint func(upstreamId, id string) (*Endpoint, error) + GetHost func(name string) (*Host, error) + GetHosts func() ([]*Host, error) + GetLocation func(hostname, id string) (*Location, error) + GetLocationMiddleware func(hostname, locationId string, mType, id string) (*MiddlewareInstance, error) + GetRegistry func() *plugin.Registry + GetUpstream func(id string) (*Upstream, error) + GetUpstreams func() ([]*Upstream, error) + UpdateHostKeyPair func(hostname string, keyPair *KeyPair) (*Host, error) + UpdateLocationMiddleware func(hostname, locationId string, m *MiddlewareInstance) (*MiddlewareInstance, error) + UpdateLocationOptions func(hostname, locationId string, o LocationOptions) (*Location, error) + UpdateLocationUpstream func(hostname, id string, upstream string) (*Location, error) + UpdateUpstreamOptions func(upId string, o UpstreamOptions) (*Upstream, error) + WatchChanges func(changes chan interface{}, cancel chan bool) error + type Bracket struct + Quantile float64 + Value time.Duration + func NewBrackets(h metrics.Histogram) []Bracket + type Counters struct + NetErrors int64 + Period time.Duration + StatusCodes []StatusCode + Total int64 + type Endpoint struct + Id string + Stats RoundTripStats + UpstreamId string + Url string + func EndpointFromJSON(in []byte) (*Endpoint, error) + func NewEndpoint(upstreamId, id, url string) (*Endpoint, error) + func (e *Endpoint) GetId() string + func (e *Endpoint) GetUniqueId() EndpointKey + func (e *Endpoint) String() string + type EndpointAdded struct + Endpoint *Endpoint + Upstream *Upstream + type EndpointDeleted struct + EndpointId string + Upstream *Upstream + type EndpointKey struct + Id string + UpstreamId string + func MustParseEndpointKey(v string) EndpointKey + func ParseEndpointKey(v string) (*EndpointKey, error) + func (e EndpointKey) String() string + type EndpointUpdated struct + Endpoint *Endpoint + Upstream *Upstream + type Host struct + KeyPair *KeyPair + Listeners []*Listener + Locations []*Location + Name string + Options HostOptions + func HostFromJSON(in []byte, getter plugin.SpecGetter) (*Host, error) + func HostsFromJSON(in []byte, getter plugin.SpecGetter) ([]*Host, error) + func NewHost(name string) (*Host, error) + func (h *Host) GetId() string + func (h *Host) String() string + type HostAdded struct + Host *Host + type HostDeleted struct + Name string + type HostKeyPairUpdated struct + Host *Host + type HostListenerAdded struct + Host *Host + Listener *Listener + type HostListenerDeleted struct + Host *Host + ListenerId string + type HostOptions struct + Default bool + type KeyPair struct + Cert []byte + Key []byte + func KeyPairFromJSON(in []byte) (*KeyPair, error) + func NewKeyPair(cert, key []byte) (*KeyPair, error) + func (c *KeyPair) Equals(o *KeyPair) bool + type LatencyBrackets []Bracket + func (l LatencyBrackets) GetQuantile(q float64) (*Bracket, error) + type Listener struct + Address Address + Id string + Protocol string + func ListenerFromJSON(in []byte) (*Listener, error) + func NewListener(id, protocol, network, address string) (*Listener, error) + func (l *Listener) String() string + type Location struct + Hostname string + Id string + Middlewares []*MiddlewareInstance + Options LocationOptions + Path string + Stats RoundTripStats + Upstream *Upstream + func LocationFromJSON(in []byte, getter plugin.SpecGetter) (*Location, error) + func LocationsFromJSON(in []byte, getter plugin.SpecGetter) ([]*Location, error) + func NewLocation(hostname, id, path, upstreamId string) (*Location, error) + func NewLocationWithOptions(hostname, id, path, upstreamId string, options LocationOptions) (*Location, error) + func (l *Location) GetId() string + func (l *Location) GetOptions() (*httploc.Options, error) + func (l *Location) GetUniqueId() LocationKey + func (l *Location) String() string + type LocationAdded struct + Host *Host + Location *Location + type LocationDeleted struct + Host *Host + LocationId string + type LocationKey struct + Hostname string + Id string + func (l LocationKey) String() string + type LocationLimits struct + MaxBodyBytes int64 + MaxMemBodyBytes int64 + type LocationMiddlewareAdded struct + Host *Host + Location *Location + Middleware *MiddlewareInstance + type LocationMiddlewareDeleted struct + Host *Host + Location *Location + MiddlewareId string + MiddlewareType string + type LocationMiddlewareUpdated struct + Host *Host + Location *Location + Middleware *MiddlewareInstance + type LocationOptions struct + FailoverPredicate string + Hostname string + Limits LocationLimits + TrustForwardHeader bool + func LocationOptionsFromJSON(in []byte) (*LocationOptions, error) + type LocationOptionsUpdated struct + Host *Host + Location *Location + type LocationPathUpdated struct + Host *Host + Location *Location + Path string + type LocationUpstreamUpdated struct + Host *Host + Location *Location + type MiddlewareInstance struct + Id string + Middleware plugin.Middleware + Priority int + Type string + func MiddlewareFromJSON(in []byte, getter plugin.SpecGetter) (*MiddlewareInstance, error) + type NewBackendFn func() (Backend, error) + type NotFoundError struct + Message string + func (n *NotFoundError) Error() string + type RoundTripStats struct + Counters Counters + LatencyBrackets LatencyBrackets + Verdict Verdict + func NewRoundTripStats(m *metrics.RoundTripMetrics) (*RoundTripStats, error) + func (e *RoundTripStats) AppErrorRatio() float64 + func (e *RoundTripStats) NetErrorRatio() float64 + func (e *RoundTripStats) RequestsPerSecond() float64 + func (e *RoundTripStats) ResponseCodeRatio(startA, endA, startB, endB int) float64 + func (e *RoundTripStats) String() string + type StatsProvider interface + GetEndpointStats func(e *Endpoint) (*RoundTripStats, error) + GetLocationStats func(l *Location) (*RoundTripStats, error) + GetTopEndpoints func(upstreamId string) ([]*Endpoint, error) + GetTopLocations func(hostname, upstreamId string) ([]*Location, error) + GetUpstreamStats func(u *Upstream) (*RoundTripStats, error) + type StatusCode struct + Code int + Count int64 + type Upstream struct + Endpoints []*Endpoint + Id string + Options UpstreamOptions + func NewUpstream(id string) (*Upstream, error) + func NewUpstreamWithOptions(id string, o UpstreamOptions) (*Upstream, error) + func UpstreamFromJSON(in []byte) (*Upstream, error) + func (u *Upstream) GetId() string + func (u *Upstream) GetTransportOptions() (*httploc.TransportOptions, error) + func (u *Upstream) GetUniqueId() UpstreamKey + func (u *Upstream) String() string + type UpstreamAdded struct + Upstream *Upstream + type UpstreamDeleted struct + UpstreamId string + type UpstreamKeepAlive struct + MaxIdleConnsPerHost int + Period string + type UpstreamKey struct + Id string + func (u UpstreamKey) String() string + type UpstreamOptions struct + KeepAlive UpstreamKeepAlive + Timeouts UpstreamTimeouts + func UpstreamOptionsFromJSON(in []byte) (*UpstreamOptions, error) + func (u *UpstreamOptions) Equals(o UpstreamOptions) bool + type UpstreamOptionsUpdated struct + Upstream *Upstream + type UpstreamTimeouts struct + Dial string + Read string + TlsHandshake string + type Verdict struct + Anomalies []Anomaly + IsBad bool + func (v Verdict) String() string