testutil

package
v0.0.0-...-09a8804 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertValidation

type AlertValidation = func(alert *promv1.Rule) []Problem

type Linter

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

func New

func New() *Linter

func (*Linter) AddCustomAlertValidations

func (linter *Linter) AddCustomAlertValidations(validations ...AlertValidation)

func (*Linter) AddCustomRecordRuleValidations

func (linter *Linter) AddCustomRecordRuleValidations(validations ...RecordRuleValidation)

func (*Linter) LintAlert

func (linter *Linter) LintAlert(alert *promv1.Rule) []Problem

func (*Linter) LintAlerts

func (linter *Linter) LintAlerts(alerts []promv1.Rule) []Problem

func (*Linter) LintRecordingRule

func (linter *Linter) LintRecordingRule(recordingRule *operatorrules.RecordingRule) []Problem

func (*Linter) LintRecordingRules

func (linter *Linter) LintRecordingRules(recordingRules []operatorrules.RecordingRule) []Problem

type Problem

type Problem struct {
	// The name of the Metric, Recording Rule, or Alert indicated by the Problem
	ResourceName string

	// The description of the problem found
	Description string
}

type RecordRuleValidation

type RecordRuleValidation = func(rr *operatorrules.RecordingRule) []Problem

Jump to

Keyboard shortcuts

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