config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PIDFile             string
	BindAddress         string
	ShutdownTimeout     int
	CORSAllowedOrigins  []string
	HTTPReadBufferSize  int
	HTTPWriteBufferSize int
	TCPReadBufferSize   int
	TCPWriteBufferSize  int
	WSReadBufferSize    int
	WSWriteBufferSize   int
	TCPTimeout          int
	LogManager          logman.Config
	Metrics             metrics.Config
}

func Load

func Load(path string) (c Config, err error)

type TOMLConfig

type TOMLConfig struct {
	PIDFile             string               `toml:"pid_file"`
	BindAddress         string               `toml:"bind_address"`
	ShutdownTimeout     int                  `toml:"shutdown_timeout"`
	CORSAllowedOrigins  []string             `toml:"cors_allowed_origins"`
	HTTPReadBufferSize  int                  `toml:"http_read_buffer_size"`
	HTTPWriteBufferSize int                  `toml:"http_write_buffer_size"`
	TCPReadBufferSize   int                  `toml:"tcp_read_buffer_size"`
	TCPWriteBufferSize  int                  `toml:"tcp_write_buffer_size"`
	WSReadBufferSize    int                  `toml:"websocket_read_buffer_size"`
	WSWriteBufferSize   int                  `toml:"websocket_write_buffer_size"`
	TCPTimeout          int                  `toml:"tcp_timeout"`
	LogManager          TOMLLogManagerConfig `toml:"log_manager"`
	Metrics             TOMLMetricsConfig    `toml:"metrics"`
}

type TOMLLogManagerConfig

type TOMLLogManagerConfig struct {
	DataDirectory   string `toml:"data_directory"`
	ReadBufferSize  int    `toml:"read_buffer_size"`
	WriteBufferSize int    `toml:"write_buffer_size"`
}

type TOMLMetricsConfig

type TOMLMetricsConfig struct {
	Statsd *TOMLStatsdConfig `toml:"statsd"`
}

type TOMLStatsdConfig

type TOMLStatsdConfig struct {
	Protocol string `toml:"protocol"`
	Address  string `toml:"address"`
	Prefix   string `toml:"prefix"`
}

Jump to

Keyboard shortcuts

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