expressions

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertIsFired

func AlertIsFired(job metav1.Object) (*time.Time, string, bool)

func DispatchAlert

func DispatchAlert(ctx context.Context, r common.Reconciler, alertBody *notifier.Body) error

DispatchAlert informs an object about the fired alert by updating the metadata of that object.

func SetAlert

func SetAlert(ctx context.Context, job client.Object, expr v1alpha1.ExprMetrics) error

func UnsetAlert

func UnsetAlert(_ context.Context, obj metav1.Object)

UnsetAlert removes the annotations from the target object, and removes the Alert from Grafana.

Types

type Condition

type Condition struct {
	Expr *v1alpha1.ConditionalExpr
	Info string
}

func (Condition) GetInfo

func (c Condition) GetInfo() string

func (Condition) IsTrue

func (c Condition) IsTrue(state lifecycle.ClassifierReader, job metav1.Object) bool

Jump to

Keyboard shortcuts

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