Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ Proxy: Proxy{ MaxConn: 10000, Strategy: "rnd", DialTimeout: 30 * time.Second, LocalIP: LocalIPString(), }, Listen: []Listen{ { Addr: ":9999", }, }, Consul: Consul{ Addr: "localhost:8500", KVPath: "/fabio/config", TagPrefix: "urlprefix-", ServiceName: "fabio", CheckInterval: time.Second, CheckTimeout: 3 * time.Second, }, Runtime: Runtime{ GOGC: 800, GOMAXPROCS: runtime.NumCPU(), }, UI: UI{ Addr: ":9998", Color: "light-green", }, }
Functions ¶
func LocalIP ¶ added in v1.0.6
LocalIP tries to determine a non-loopback address for the local machine
func LocalIPString ¶ added in v1.0.6
func LocalIPString() string
Types ¶
type Config ¶
type Config struct { Proxy Proxy Listen []Listen Routes string Metrics []Metrics Consul Consul UI UI Runtime Runtime }
func FromProperties ¶
func FromProperties(p *properties.Properties) (cfg *Config, err error)
Click to show internal directories.
Click to hide internal directories.