nonsla

package
v4.101.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SynTeam                                       string          = "schedar"
	SeverityCritical                              string          = "critical"
	MinuteInterval, HourInterval, TwoHourInterval promV1.Duration = "1m", "1h", "2h"
)

Variables

View Source
var (
	// AlertDefinitions is a map of alert definitions which has the name of alerts as key and the func ServiceRule as value
	AlertDefinitions = map[alert]ServiceRule{
		// contains filtered or unexported fields
	}
)

Functions

func GenerateNonSLAPromRules

func GenerateNonSLAPromRules[T client.Object](alerts Alerts) func(ctx context.Context, obj T, svc *runtime.ServiceRuntime) *fnproto.Result

Types

type AlertBuilder

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

func NewAlertSetBuilder

func NewAlertSetBuilder(containerName, namespace string) *AlertBuilder

func (*AlertBuilder) AddAll

func (a *AlertBuilder) AddAll() *AlertBuilder

func (*AlertBuilder) AddCustom

func (a *AlertBuilder) AddCustom(r []promV1.Rule) *AlertBuilder

func (*AlertBuilder) AddDisk

func (a *AlertBuilder) AddDisk() *AlertBuilder

func (*AlertBuilder) AddDiskFillingUp

func (a *AlertBuilder) AddDiskFillingUp() *AlertBuilder

func (*AlertBuilder) AddMemory

func (a *AlertBuilder) AddMemory() *AlertBuilder

func (*AlertBuilder) GetAlerts

func (a *AlertBuilder) GetAlerts() Alerts

type Alerts

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

Alerts the object that the service must create to generate non sla prometheus rules

type ServiceRule

type ServiceRule func(s, n string) promV1.Rule

ServiceRule is a func definition to get a specific rule based on a container name s

Jump to

Keyboard shortcuts

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