conf

package
v0.0.0-...-9c5c549 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Addr    string `json:"addr"`
	MgrAddr string `json:"mgrAddr"`

	RegistryAddr string `json:"registryAddr"`
	Prefix       string `json:"prefix"`

	Filers []*FilterSpec `json:"filers"`

	// Maximum number of connections which may be established to server
	MaxConns int `json:"maxConns"`
	// MaxConnDuration Keep-alive connections are closed after this duration.
	MaxConnDuration int `json:"maxConnDuration"`
	// MaxIdleConnDuration Idle keep-alive connections are closed after this duration.
	MaxIdleConnDuration int `json:"maxIdleConnDuration"`
	// ReadBufferSize Per-connection buffer size for responses' reading.
	ReadBufferSize int `json:"readBufferSize"`
	// WriteBufferSize Per-connection buffer size for requests' writing.
	WriteBufferSize int `json:"writeBufferSize"`
	// ReadTimeout Maximum duration for full response reading (including body).
	ReadTimeout int `json:"readTimeout"`
	// WriteTimeout Maximum duration for full request writing (including body).
	WriteTimeout int `json:"writeTimeout"`
	// MaxResponseBodySize Maximum response body size.
	MaxResponseBodySize int `json:"maxResponseBodySize"`

	// EnablePPROF enable pprof
	EnablePPROF bool `json:"enablePPROF"`
	// PPROFAddr pprof addr
	PPROFAddr string `json:"pprofAddr,omitempty"`
}

Conf config struct

func GetCfg

func GetCfg(file string) *Conf

GetCfg returns the conf from external file

type FilterSpec

type FilterSpec struct {
	Name               string `json:"name"`
	External           bool   `json:"external,omitempty"`
	ExternalPluginFile string `json:"externalPluginFile,omitempty"`
}

FilterSpec filter spec

Jump to

Keyboard shortcuts

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