slo

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExprBlock

type ExprBlock struct {
	AlertMethod string `yaml:"alertMethod"`
	Expr        string `yaml:"expr"`
}

func (*ExprBlock) ComputeExpr

func (block *ExprBlock) ComputeExpr(window, le string) string

type Objectives

type Objectives struct {
	Availability float64                 `yaml:"availability"`
	Latency      []methods.LatencyTarget `yaml:"latency"`
}

type SLO

type SLO struct {
	Name       string `yaml:"name"`
	Objectives Objectives

	TrafficRateRecord ExprBlock         `yaml:"trafficRateRecord"`
	ErrorRateRecord   ExprBlock         `yaml:"errorRateRecord"`
	LatencyRecord     ExprBlock         `yaml:"latencyRecord"`
	Labels            map[string]string `yaml:"labels"`
	Annotations       map[string]string `yaml:"annotations"`
}

func (SLO) GenerateAlertRules

func (slo SLO) GenerateAlertRules() []rulefmt.Rule

func (SLO) GenerateGroupRules

func (slo SLO) GenerateGroupRules() []rulefmt.RuleGroup

type SLOSpec

type SLOSpec struct {
	SLOS []SLO
}

Jump to

Keyboard shortcuts

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