Documentation ¶
Index ¶
- Variables
- func LocalIP() (net.IP, error)
- func LocalIPString() string
- type CertSource
- type Config
- type Consul
- type File
- type FlagSet
- func (f *FlagSet) IsSet(name string) bool
- func (f *FlagSet) KVSliceVar(p *[]map[string]string, name string, value []map[string]string, usage string)
- func (f *FlagSet) KVVar(p *map[string]string, name string, value map[string]string, usage string)
- func (f *FlagSet) ParseFlags(args, environ, prefixes []string, p *properties.Properties) error
- func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string)
- type Listen
- type Metrics
- type Proxy
- type Registry
- type Runtime
- type Static
- type UI
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &Config{ ListenerValue: []string{":9999"}, Proxy: Proxy{ MaxConn: 10000, Strategy: "rnd", Matcher: "prefix", NoRouteStatus: 404, DialTimeout: 30 * time.Second, FlushInterval: time.Second, LocalIP: LocalIPString(), }, Registry: Registry{ Backend: "consul", Consul: Consul{ Addr: "localhost:8500", Scheme: "http", KVPath: "/fabio/config", TagPrefix: "urlprefix-", Register: true, ServiceAddr: ":9998", ServiceName: "fabio", ServiceStatus: []string{"passing"}, CheckInterval: time.Second, CheckTimeout: 3 * time.Second, }, }, Runtime: Runtime{ GOGC: 800, GOMAXPROCS: runtime.NumCPU(), }, UI: UI{ Addr: ":9998", Color: "light-green", }, Metrics: Metrics{ Prefix: "default", Names: "{{clean .Service}}.{{clean .Host}}.{{clean .Path}}.{{clean .TargetURL.Host}}", Interval: 30 * time.Second, CirconusAPIApp: "fabio", }, CertSources: map[string]CertSource{}, }
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 CertSource ¶ added in v1.2.1
type Config ¶
type FlagSet ¶ added in v1.2.1
-- FlagSet
func NewFlagSet ¶ added in v1.2.1
func NewFlagSet(name string, errorHandling flag.ErrorHandling) *FlagSet
func (*FlagSet) KVSliceVar ¶ added in v1.2.1
func (*FlagSet) ParseFlags ¶ added in v1.2.1
func (f *FlagSet) ParseFlags(args, environ, prefixes []string, p *properties.Properties) error
ParseFlags parses command line arguments and provides fallback values from environment variables and config file values. Environment variables are case-insensitive and can have either of the provided prefixes.
type Proxy ¶
type Proxy struct { Strategy string Matcher string NoRouteStatus int MaxConn int ShutdownWait time.Duration DialTimeout time.Duration ResponseHeaderTimeout time.Duration KeepAliveTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration FlushInterval time.Duration LocalIP string ClientIPHeader string TLSHeader string TLSHeaderValue string }
Click to show internal directories.
Click to hide internal directories.