alert

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatLabels

func FormatLabels(labels map[string]string) string

func Sort

func Sort(alerts []Alert)

Types

type Alert

type Alert struct {
	OpenedAt   time.Time
	ResolvedAt *time.Time
	Labels     map[string]string
	URL        string
	Source     string
}

func CombineEvents

func CombineEvents(events []evaluator.Event, expr string, urlBuilder dashboard.URLBuilder) (result []Alert)

func Evaluate

func Evaluate(
	ctx context.Context,
	client prometheus.Client,
	rule rulefmt.Rule,
	from time.Time,
	to time.Time,
	interval time.Duration,
	urlBuilder dashboard.URLBuilder,
) ([]Alert, error)

func (Alert) Match

func (a Alert) Match(b Alert) bool

Jump to

Keyboard shortcuts

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