config

package
v0.0.0-...-7a33d98 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: MIT Imports: 3 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 {
	Interval int            `hcl:"interval"`
	Prefix   string         `hcl:"prefix"`
	Statsd   string         `hcl:"statsd"`
	Groups   []TargetGroups `hcl:"target_group"`
}

Struct for the global config

func Parse

func Parse(ConfigFile string) (*Config, error)

parse the config

type TargetGroups

type TargetGroups struct {
	Name     string    `hcl:",key"`
	Prefix   string    `hcl:"prefix"`
	Interval int       `hcl:"interval"`
	Targets  []Targets `hcl:"target"`
}

nested struct for the groups

type Targets

type Targets struct {
	Address string `hcl:"address"`
	Label   string `hcl:",key"`
}

final tested struct for the targets in each group

Jump to

Keyboard shortcuts

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