readiness

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name string
	// contains filtered or unexported fields
}

Check represents a parsed readiness check CEL expression.

func ParseCheck

func ParseCheck(expr string) (*Check, error)

ParseCheck parses the given CEL expression in the context of an environment, and returns a reusable execution handle.

func (*Check) Eval

func (r *Check) Eval(ctx context.Context, comp *apiv1.Composition, resource *unstructured.Unstructured) (*Status, bool)

Eval executes the compiled check against a given resource.

type Checks

type Checks []*Check

func (Checks) Eval

func (r Checks) Eval(ctx context.Context, comp *apiv1.Composition, resource *unstructured.Unstructured) (*Status, bool)

Eval evaluates and prioritizes the set of readiness checks.

- Nil is returned when less than all of the checks are ready - If some precise and some inprecise times are given, the precise times are favored - Within precise or non-precise times, the max of that group is always used

func (Checks) EvalOptionally

func (r Checks) EvalOptionally(ctx context.Context, comp *apiv1.Composition, resource *unstructured.Unstructured) (*Status, bool)

EvalOptionally is identical to Eval, except it returns the current time in the status if no checks are set.

func (Checks) Unsatisfied added in v0.2.13

func (r Checks) Unsatisfied(ctx context.Context, comp *apiv1.Composition, resource *unstructured.Unstructured) []string

Unsatisfied returns the names of the checks that are not currently passing. It's used to explain why a resource has not yet become ready.

type Status

type Status struct {
	ReadyTime   metav1.Time
	PreciseTime bool // true when time came from a condition, not the controller's metav1.Now
}

Jump to

Keyboard shortcuts

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