evaluator

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

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

func New

func New(name string, expr string, forDuration time.Duration) (*Evaluator, error)

func (*Evaluator) Evaluate

func (e *Evaluator) Evaluate(
	ctx context.Context,
	queryFn rules.QueryFunc,
	timestamps []time.Time,
) ([]Event, error)

type Event

type Event struct {
	Time   time.Time
	Labels map[string]string
	Type   EventType
}

type EventType

type EventType int
const (
	EventOpened EventType = iota
	EventResolved
)

Jump to

Keyboard shortcuts

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