Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Algorithm string `json:"algorithm"` CDF int `json:"-"` //cumulative density function (sum of weights) Servers []Server `json:"servers"` }
A Cluster aggregates more Servers into a pool
type Config ¶
type Config struct { Frontends map[string]*Frontend `json:"frontends"` Clusters map[string]*Cluster `json:"clusters"` // contains filtered or unexported fields }
Config for the main program
func ReadConfigJSON ¶
ReadConfigJSON reads a json configuration file returning the Config object
func ReadConfigYAML ¶
ReadConfigYAML reads a yaml configuration file returning the Config object
type Frontend ¶
type Frontend struct { Name string `json:"name"` Active bool `json:"active"` Listen string `json:"listen"` TLS TLS `json:"tls,omitempty"` Pool string `json:"pool"` Bounce []int `json:"bounce,omitempty"` Logfile string `json:"logfile,omitempty"` Proxy *http.Server `json:"-"` Logger *zap.Logger `json:"-"` LogLevel *zap.AtomicLevel `json:"-"` }
A Frontend is the proxy interface
Click to show internal directories.
Click to hide internal directories.