config

package
v0.2401.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config implements global metrics configuration options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Metrics mode (none, pull, push).
	Mode string `yaml:"mode"`
	// Metrics pull address.
	Address string `yaml:"address"`

	// Metrics push job name (debug-only).
	JobName string `yaml:"job_name,omitempty"`
	// Metrics push instance labels (debug-only).
	Labels map[string]string `yaml:"labels,omitempty"`
	// Metrics push interval (debug-only).
	Interval time.Duration `yaml:"interval,omitempty"`
}

Config is the metrics configuration structure.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration settings.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration settings.

Jump to

Keyboard shortcuts

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