config

package
v0.0.0-...-e4c4ac9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValueModeAuto = "auto"
	ValueModeHttp = "http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterConfig

type CounterConfig struct {
	Prefix    string         `yaml: prefix`
	Number    int            `yaml: number,omitempty`
	Labels    []LabelSetting `yaml: labels,omitempty`
	ValueMode ValueMode      `yaml: valuemode,omitempty`
}

type GaugeConfig

type GaugeConfig struct {
	Prefix    string         `yaml: prefix`
	Number    int            `yaml: number,omitempty`
	Labels    []LabelSetting `yaml: labels,omitempty`
	Range     GaugeRange     `yaml: range,omitempty`
	ValueMode ValueMode      `yaml: valuemode,omitempty`
}

type GaugeRange

type GaugeRange struct {
	Upper int64 `yaml: upper`
	Lower int64 `yaml: lower`
}

type GeneratorConfig

type GeneratorConfig struct {
	Counters []*CounterConfig `yaml: counters,omitempty`
	Gauges   []*GaugeConfig   `yaml: gauges,omitempty`
}

func ParseConfig

func ParseConfig(file string) (*GeneratorConfig, error)

type LabelSetting

type LabelSetting struct {
	Name     string   `yaml: name`
	ValueSet []string `yaml: valueset`
}

type ValueMode

type ValueMode string

Jump to

Keyboard shortcuts

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