config

package
v0.0.0-...-87743ad Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: LGPL-3.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 Config

type Config struct {
	// Measurements is the ids of measurements used as source for metrics generation
	Measurements         []Measurement    `yaml:"measurements"`
	HistogramBuckets     HistogramBuckets `yaml:"histogram_buckets"`
	FilterInvalidResults bool             `yaml:"filter_invalid_results"`
}

Config represents the configuration for the exporter

func Load

func Load(r io.Reader) (*Config, error)

Load loads a config from a reader

func (*Config) MeasurementIDs

func (c *Config) MeasurementIDs() []string

MeasurementIDs represents all IDs of configured measurements

type HistogramBuckets

type HistogramBuckets struct {
	DNS        RttHistogramBucket `yaml:"dns,omitempty"`
	HTTP       RttHistogramBucket `yaml:"http,omitempty"`
	Ping       RttHistogramBucket `yaml:"ping,omitempty"`
	Traceroute RttHistogramBucket `yaml:"traceroute,omitempty"`
}

HistogramBuckets defines buckets for several histograms

type Measurement

type Measurement struct {
	ID      string        `yaml:"id"`
	Timeout time.Duration `yaml:"timeout,omitempty"`
}

Measurement represents config options for one measurement

type RttHistogramBucket

type RttHistogramBucket struct {
	Rtt []float64 `yaml:"rtt"`
}

RttHistogramBucket defines buckets for RTT histograms

Jump to

Keyboard shortcuts

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