rules

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromAPIRules added in v0.0.1

func FromAPIRules(groups []monitoringv1.RuleGroup) (result rulefmt.RuleGroups, err error)

FromAPIRules constructs rule groups from a list of rule groups in the resource API format. It ensures that the groups are valid according to the Prometheus upstream validation logic.

func Scope added in v0.0.1

func Scope(groups *rulefmt.RuleGroups, lset map[string]string) error

Scope all rules in the given groups to the given labels. All metric selectors check for equality on the labels and all rule results are annotated with them again. This ensures that the scope is preserved in output data, even if the given label keys are aggregated away. An error is returned if metric selectors have a conflicting selector set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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