config

package
v1.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalIP added in v1.0.6

func LocalIP() (net.IP, error)

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 CertSource struct {
	Name         string
	Type         string
	CertPath     string
	KeyPath      string
	ClientCAPath string
	CAUpgradeCN  string
	Refresh      time.Duration
	Header       http.Header
}

type Circonus added in v1.3.6

type Circonus struct {
	APIKey   string
	APIApp   string
	APIURL   string
	CheckID  string
	BrokerID string
}

type Config

type Config struct {
	Proxy       Proxy
	Registry    Registry
	Listen      []Listen
	Log         Log
	Metrics     Metrics
	UI          UI
	Runtime     Runtime
	ProfileMode string
	ProfilePath string
	Insecure    bool
}

func Load added in v1.1.1

func Load(args, environ []string) (cfg *Config, err error)

type Consul

type Consul struct {
	Addr                                string
	Scheme                              string
	Token                               string
	KVPath                              string
	NoRouteHTMLPath                     string
	TagPrefix                           string
	Register                            bool
	ServiceAddr                         string
	ServiceName                         string
	ServiceTags                         []string
	ServiceStatus                       []string
	CheckInterval                       time.Duration
	CheckTimeout                        time.Duration
	CheckScheme                         string
	CheckTLSSkipVerify                  bool
	CheckDeregisterCriticalServiceAfter string
	ChecksRequired                      string
}

type File added in v1.1.1

type File struct {
	NoRouteHTMLPath string
	RoutesPath      string
}

type FlagSet added in v1.2.1

type FlagSet struct {
	flag.FlagSet
	// contains filtered or unexported fields
}

-- FlagSet

func NewFlagSet added in v1.2.1

func NewFlagSet(name string, errorHandling flag.ErrorHandling) *FlagSet

func (*FlagSet) IsSet added in v1.2.1

func (f *FlagSet) IsSet(name string) bool

IsSet returns true if a variable was set via any mechanism.

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.

func (*FlagSet) StringSliceVar added in v1.2.1

func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string)

type Listen

type Listen struct {
	Addr          string
	Proto         string
	ReadTimeout   time.Duration
	WriteTimeout  time.Duration
	CertSource    CertSource
	StrictMatch   bool
	TLSMinVersion uint16
	TLSMaxVersion uint16
	TLSCiphers    []uint16
}

type Log added in v1.4.1

type Log struct {
	AccessFormat string
	AccessTarget string
	RoutesFormat string
	Level        string
}

type Metrics

type Metrics struct {
	Target       string
	Prefix       string
	Names        string
	Interval     time.Duration
	Timeout      time.Duration
	Retry        time.Duration
	GraphiteAddr string
	StatsDAddr   string
	Circonus     Circonus
}

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
	FlushInterval         time.Duration
	LocalIP               string
	ClientIPHeader        string
	TLSHeader             string
	TLSHeaderValue        string
	GZIPContentTypes      *regexp.Regexp
	RequestID             string
	STSHeader             STSHeader
}

type Registry added in v1.1.1

type Registry struct {
	Backend string
	Static  Static
	File    File
	Consul  Consul
	Timeout time.Duration
	Retry   time.Duration
}

type Runtime

type Runtime struct {
	GOGC       int
	GOMAXPROCS int
}

type STSHeader added in v1.5.7

type STSHeader struct {
	MaxAge     int
	Subdomains bool
	Preload    bool
}

type Static added in v1.1.1

type Static struct {
	NoRouteHTML string
	Routes      string
}

type UI

type UI struct {
	Listen Listen
	Color  string
	Title  string
	Access string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL