Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) AddPool(pool Pool)
- func (c *Config) AddPort(port Port)
- func (c *Config) AddRule(rule Rule)
- func (c *Config) AddTrie(trie Trie)
- func (c *Config) ConstructPool(pool Pool) *backend.Pool
- func (c *Config) ConstructPoolConfig(pool Pool) backend.PoolConfig
- func (c *Config) ConstructRule(rule Rule) *routing.Rule
- func (c *Config) ConstructServer(host Host) *backend.Server
- func (c *Config) ConstructTrie(trie Trie) *routing.Trie
- func (c *Config) DelPool(name string)
- func (c *Config) DelPort(num uint16)
- func (c *Config) DelRule(name string)
- func (c *Config) DelTrie(name string)
- func (c *Config) PrintRouting(port uint16, r *http.Request) string
- func (c *Config) RoutePort(port uint16, r *http.Request) *backend.Pool
- func (c *Config) RouteTrie(trie *routing.Trie, r *http.Request) *backend.Pool
- func (c *Config) StatusZJSON() (string, error)
- func (c *Config) UpdatePool(pool Pool)
- func (c *Config) UpdatePort(port Port)
- func (c *Config) UpdateRule(rule Rule)
- func (c *Config) UpdateTrie(trie Trie)
- type Host
- type Pool
- type PoolConfig
- type Port
- type Rule
- type StatusZ
- type Trie
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxRoutingHops = 128
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { sync.RWMutex MatcherFactory *routing.MatcherFactory Pools map[string]*backend.Pool Rules map[string]*routing.Rule Tries map[string]*routing.Trie Ports map[uint16]*routing.Trie }
func NewConfig ¶
func NewConfig(matcherFactory *routing.MatcherFactory) *Config
func (*Config) ConstructPoolConfig ¶
func (c *Config) ConstructPoolConfig(pool Pool) backend.PoolConfig
func (*Config) PrintRouting ¶
This leaks the abstractions of routing.Trie.Walk() and config.Route() and is strictly a debugging aid.
func (*Config) StatusZJSON ¶
func (*Config) UpdatePool ¶
func (*Config) UpdatePort ¶
func (*Config) UpdateRule ¶
func (*Config) UpdateTrie ¶
type Pool ¶
type Pool struct { Name string Internal bool Hosts map[string]Host Config PoolConfig }
func (Pool) StringIndent ¶
type PoolConfig ¶
type PoolConfig struct { HealthzEvery string HealthzTimeout string RequestTimeout string Status string }
func (PoolConfig) Equals ¶
func (p PoolConfig) Equals(o PoolConfig) bool
func (PoolConfig) String ¶
func (p PoolConfig) String() string
func (PoolConfig) StringIndent ¶
func (p PoolConfig) StringIndent(i string) (str string)
type Port ¶
func (Port) StringIndent ¶
type Rule ¶
func (Rule) StringIndent ¶
type StatusZ ¶
type StatusZ struct { Pool string `json:"pool"` Server string `json:"server"` RequestsInFlight uint32 `json:"requests_in_flight"` RequestsServiced uint64 `json:"requests_serviced"` Status string `json:"status"` StatusChanged string `json:"status_changed"` }
Serialization expected by the javascript which displays status information, and also by services polling /statusz to monitor health of routers and pools.
Click to show internal directories.
Click to hide internal directories.