config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MetricEndpointLocal = "local"

MetricEndpointLocal text for local metric endpoint

Variables

This section is empty.

Functions

func PrintDefaultConfig

func PrintDefaultConfig() error

PrintDefaultConfig to termianl

Types

type Config

type Config struct {
	Metric     metricConfig       `toml:"metric"`
	Logging    []zapwriter.Config `toml:"logging"`
	File       fileConfig         `toml:"file"`
	Prometheus promConfig         `toml:"prometheus"`
	TCP        tcpConfig          `toml:"tcp"`
	UDP        udpConfig          `toml:"udp"`
	Uploader   uploaderConfig     `toml:"uploader"`
}

Config for syphon server

func ReadConfig

func ReadConfig(filename string) (*Config, error)

ReadConfig from file

type Duration

type Duration struct {
	time.Duration
}

Duration wrapper time.Duration for TOML

func (*Duration) MarshalText

func (d *Duration) MarshalText() ([]byte, error)

MarshalText encode text with TOML format

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText from TOML

func (*Duration) Value

func (d *Duration) Value() time.Duration

Value return time.Duration value

Jump to

Keyboard shortcuts

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