config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(buf []byte, c *Config) error

Load loads a config and applies defaults

func LoadFile

func LoadFile(filename string, c *Config) error

LoadFile reads a file and passes the contents to Load

Types

type Config

type Config struct {
	Server     server.Config     `yaml:"server"`
	Prometheus prometheus.Config `yaml:"prometheus,omitempty"`
}

Config contains underlying configurations for the agent

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

ApplyDefaults sets default values in the config

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags in underlying configs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳