k8sprometheus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSLORules will be used when there are no rules to store. The upper layer
	// could ignore or handle the error in cases where there wasn't an output.
	ErrNoSLORules = fmt.Errorf("0 SLO Prometheus rules generated")
)
View Source
var YAMLSpecLoader = yamlSpecLoader{
	// contains filtered or unexported fields
}

YAMLSpecLoader knows how to load Kubernetes ServiceLevel YAML specs and converts them to a model.

Functions

This section is empty.

Types

type IOWriterPrometheusOperatorYAMLRepo

type IOWriterPrometheusOperatorYAMLRepo struct {
	// contains filtered or unexported fields
}

IOWriterPrometheusOperatorYAMLRepo knows to store all the SLO rules (recordings and alerts) grouped in an IOWriter in Kubernetes prometheus operator YAML format.

func NewIOWriterPrometheusOperatorYAMLRepo

func NewIOWriterPrometheusOperatorYAMLRepo(writer io.Writer, logger log.Logger) IOWriterPrometheusOperatorYAMLRepo

func (IOWriterPrometheusOperatorYAMLRepo) StoreSLOs

type K8sMeta

type K8sMeta struct {
	Name        string `validate:"required"`
	Namespace   string
	Annotations map[string]string
	Labels      map[string]string
}

K8sMeta is the Kubernetes metadata simplified.

type SLOGroup

type SLOGroup struct {
	K8sMeta K8sMeta
	prometheus.SLOGroup
}

SLOGroup is a Kubernetes SLO group. Is created based on a regular Prometheus SLO model and Kubernetes data.

func (SLOGroup) Validate

func (s SLOGroup) Validate() error

Validate validates the SLO.

type StorageSLO

type StorageSLO struct {
	SLO   prometheus.SLO
	Rules prometheus.SLORules
}

Jump to

Keyboard shortcuts

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