config

package
v0.0.0-...-5c9b5e9 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Labels    map[string]string `yaml:"labels"`
	LogGroups []LogGroupConfig  `yaml:"log_groups"`
	Exports   []*ExportConfig   `yaml:"exports"`
	// contains filtered or unexported fields
}

func LoadFile

func LoadFile(filename string) (conf *Config, err error)

type ExportConfig

type ExportConfig struct {
	Name       string `yaml:"name"`
	MetricPath string `yaml:"path"`
}

type LogGroupConfig

type LogGroupConfig struct {
	Name         string            `yaml:"name"`
	SourceFiles  []string          `yaml:"files"`
	GlobalLabels map[string]string `yaml:"labels"`
	Metrics      []*MetricConfig   `yaml:"metrics"`
}

func (*LogGroupConfig) Labels

func (this *LogGroupConfig) Labels() (labels, values []string)

type MetricConfig

type MetricConfig struct {
	Name              string              `yaml:"name"`
	Desc              string              `yaml:"help"`
	Type              string              `yaml:"type"`
	Export            string              `yaml:"export_to"`
	Buckets           []float64           `yaml:"buckets"`
	Objectives        map[float64]float64 `yaml:"objectives"`
	SummaryMaxAge     time.Duration       `yaml:"max_age"`
	SummaryAgeBuckets uint32              `yaml:"age_buckets"`
	MetricLabels      map[string]string   `yaml:"labels"`
	ValueKey          string              `yaml:"value"`
}

func (*MetricConfig) Labels

func (this *MetricConfig) Labels() (labels, values []string)

Jump to

Keyboard shortcuts

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