config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertMapper

type AlertMapper struct {
	Label string `json:"label"`
}

type AlertMappingType

type AlertMappingType struct {
	LabelSelector      []LabelSelector `yaml:"label_selector" json:"label_selector"`
	ServiceLabels      []string        `yaml:"service_labels" json:"service_labels"`
	ServiceAnnotations []string        `yaml:"service_annotations" json:"service_annotations"`
}

AlertMappingType ..

type LabelSelector

type LabelSelector map[string]string

LabelSelector ..

type MappingType

type MappingType struct {
	AlertConfig  AlertMappingType  `yaml:"alerts" json:"alerts"`
	MetricConfig MetricMappingType `yaml:"metrics" json:"metrics"`
}

MappingType ..

type MetricMappingType

type MetricMappingType struct {
	ServiceLabels []string `yaml:"service_labels" json:"service_labels"`
	Queries       []Query  `yaml:"queries" json:"queries"`
}

MetricMappingType ..

type Query

type Query struct {
	Name         string `yaml:"name" json:"name"`
	Query        string `yaml:"query" json:"query"`
	ServiceLabel string `yaml:"service_label" json:"service_label"`
}

Query ..

type ServerConfig

type ServerConfig struct {
	Upstream UpstreamType `yaml:"upstream" json:"upstream"`
	Mapping  MappingType  `yaml:"mapping" json:"mapping"`
}

ServerConfig ..

func FromFile

func FromFile(path string) (*ServerConfig, error)

FromFile ..

type UpstreamConfig

type UpstreamConfig struct {
	URL string `yaml:"url" json:"url"`
}

UpstreamConfig ..

type UpstreamType

type UpstreamType struct {
	Prometheus   UpstreamConfig `yaml:"prometheus" json:"prometheus"`
	Alertmanager UpstreamConfig `yaml:"alertmanager" json:"alertmanager"`
}

UpstreamType ..

Jump to

Keyboard shortcuts

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