config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circonus added in v0.0.2

type Circonus struct {
	APIKey        string `yaml:"api_key"`
	APIURL        string `yaml:"api_url"`
	FlushDuration string `yaml:"flush_interval"`
	FlushInterval time.Duration
}

type Config

type Config struct {
	Server      Server      `yaml:"server"`
	Destination Destination `yaml:"destination"`
	Circonus    Circonus    `yaml:"circonus"`
	Debug       bool
}

func Load

func Load(file string) (*Config, error)

type Destination

type Destination struct {
	TLSConfig  *tls.Config
	Host       string `yaml:"host"`
	Port       string `yaml:"port"`
	CAFile     string `yaml:"ca_file"`
	SkipVerify bool   `yaml:"skip_verify"`
	EnableTLS  bool   `yaml:"enable_tls"`
}

type Server

type Server struct {
	Address           string `yaml:"listen_address"`      // :19200
	CertFile          string `yaml:"cert_file"`           // empty means no tls
	KeyFile           string `yaml:"key_file"`            // empty means no tls
	ReadTimeout       string `yaml:"read_timeout"`        // 60 second
	WriteTimeout      string `yaml:"write_timeout"`       // 60 second
	IdleTimeout       string `yaml:"idle_timeout"`        // 30 seconds
	ReadHeaderTimeout string `yaml:"read_header_timeout"` // 5 seconds
	HandlerTimeout    string `yaml:"handler_timeout"`     // 30 seconds
}

Jump to

Keyboard shortcuts

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