config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 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 {
	Headers          map[string]string        `yaml:"headers,omitempty"`
	Metrics          []Metric                 `yaml:"metrics"`
	HTTPClientConfig pconfig.HTTPClientConfig `yaml:"http_client_config,omitempty"`
}

Config contains metrics and headers defining a configuration

func LoadConfig

func LoadConfig(configPath string) (Config, error)

type Metric

type Metric struct {
	Name   string
	Path   string
	Labels map[string]string
	Type   MetricType
	Help   string
	Values map[string]string
}

Metric contains values that define a metric

type MetricType

type MetricType string
const (
	ValueScrape  MetricType = "value" // default
	ObjectScrape MetricType = "object"
)

Jump to

Keyboard shortcuts

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