promyaml

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package promyaml shows how to get (Prometheus) configuration from YAML file.

Level: intermediate Topics: yaml, tpg-tools

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Global GlobalConfig
}

func ConfigFrom

func ConfigFrom(path string) (Config, error)

type GlobalConfig

type GlobalConfig struct {
	ScrapeInterval     time.Duration     `yaml:"scrape_interval"`
	EvaluationInterval time.Duration     `yaml:"evaluation_interval"`
	ScrapeTimeout      time.Duration     `yaml:"scrape_timeout"`
	ExternalLabels     map[string]string `yaml:"external_labels"`
}

Jump to

Keyboard shortcuts

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