config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintConfig

func PrintConfig(url string, token string, metrics []*client.MetricDescriptor, output io.Writer)

PrintConfig prints the given metrics to the stdout

Types

type AlarmHistoryConfig added in v0.0.7

type AlarmHistoryConfig struct {
	Enabled   bool `ini:"enabled"`
	QueryTime int  `ini:"max-query-time"`
}

AlarmHistoryConfig represents the alarms portion of the config

type ApplicationConfig

type ApplicationConfig struct {
	MaxConcurrentRouters int `ini:"max-concurrent-routers"`
}

ApplicationConfig represents the application porition of the config

type Config

type Config struct {
	Target       TargetConfig
	Application  ApplicationConfig
	Influx       InfluxConfig
	AlarmHistory AlarmHistoryConfig
	Metrics      MetricsConfig
}

Config represents the application's configuration

func Load

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

Load loads a configuration file and returns a configuration object

type InfluxConfig

type InfluxConfig struct {
	Address  string `ini:"address"`
	Username string `ini:"username"`
	Password string `ini:"password"`
	Database string `ini:"database"`
}

InfluxConfig represents the influx porition of the config

type MetricsConfig added in v0.0.7

type MetricsConfig struct {
	QueryTime int `ini:"max-query-time"`
	Metrics   []string
}

MetricsConfig represents the metric portion of the config

type TargetConfig

type TargetConfig struct {
	URL   string `ini:"url"`
	Token string `ini:"token"`
}

TargetConfig represents the target porition of the config

Jump to

Keyboard shortcuts

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