config

package
v0.0.0-...-9704f92 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Namespace string `yaml:"aws_namespace"`
	Name      string `yaml:"aws_metric_name"`

	Statistics            []string            `yaml:"aws_statistics"`
	ExtendedStatistics    []string            `yaml:"aws_extended_statistics,omitempty"`
	Dimensions            []string            `yaml:"aws_dimensions,omitempty"`
	DimensionsSelect      map[string][]string `yaml:"aws_dimensions_select,omitempty"`
	DimensionsSelectRegex map[string]string   `yaml:"aws_dimensions_select_regex,omitempty"`
	DimensionsSelectParam map[string][]string `yaml:"aws_dimensions_select_param,omitempty"`

	RangeSeconds  int `yaml:"range_seconds,omitempty"`
	PeriodSeconds int `yaml:"period_seconds,omitempty"`
	DelaySeconds  int `yaml:"delay_seconds,omitempty"`
}

func (*Metric) UnmarshalYAML

func (m *Metric) UnmarshalYAML(unmarshal func(interface{}) error) error

type Settings

type Settings struct {
	AutoReload  bool   `yaml:"auto_reload,omitempty"`
	ReloadDelay int    `yaml:"auto_reload_delay,omitempty"`
	Tasks       []Task `yaml:"tasks"`
}

func Load

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

func (*Settings) GetTask

func (s *Settings) GetTask(name string) (*Task, error)

type Task

type Task struct {
	Name          string   `yaml:"name"`
	DefaultRegion string   `yaml:"default_region,omitempty"`
	Metrics       []Metric `yaml:"metrics"`
}

Jump to

Keyboard shortcuts

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