config

package
v0.0.0-...-4b3986e Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeriskopConfig

type PeriskopConfig struct {
	Services   []Service  `yaml:"services"`
	Repository Repository `yaml:"repository"`
}

func Load

func Load(s string) (*PeriskopConfig, error)

Load parses the YAML input s into a Config.

func LoadFile

func LoadFile(filename string) (*PeriskopConfig, error)

LoadFile parses the given YAML file into a Config.

type Repository

type Repository struct {
	Type string `yaml:"type"`
	Path string `yaml:"path,omitempty"`
	Dsn  string `yaml:"dsn,omitempty"`
}

type Scraper

type Scraper struct {
	RefreshInterval time.Duration `yaml:"refresh_interval"`
	Endpoint        string        `yaml:"endpoint"`
}

type Service

type Service struct {
	Name             string                                             `yaml:"name"`
	ServiceDiscovery prometheus_discovery_config.ServiceDiscoveryConfig `yaml:",inline"`
	Scraper          Scraper                                            `yaml:"scraper"`
	RelabelConfigs   []*prometheus_relabel.Config                       `yaml:"relabel_configs,omitempty"`
}

Jump to

Keyboard shortcuts

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