expression

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package expression evaluates conditions with CEL (ADR-0009).

The one place `cel-go` is imported. The core describes what a condition is and never learns that a third-party evaluator exists (rule 1, ADR-0001), which is what lets the engine be replaced without a rule changing - and what the architecture gate checks by name.

CEL is the choice because of what it cannot do: no loops, no I/O, no user-defined functions, and every program terminates. Those are properties of the language, not of this configuration. What the configuration adds is the three bounds automation.md §1.2 asks for - a maximum length, a cost limit and a timeout - because "terminates" is not the same as "terminates soon enough", and a nested expression can be finite and still spend a worker's afternoon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CEL

type CEL struct{}

CEL is the compiler, and it holds nothing per expression.

The environment is a parameter of Compile rather than a field, because two callers use two different sets of names: an automation rule sees the event and the entry it is about, and a retention rule sees the row it is deciding. One compiler, two vocabularies.

func New

func New() CEL

func (CEL) Compile

func (CEL) Compile(
	text string, environment port.Environment, want port.Result,
) (port.Program, error)

Compile parses and type-checks one expression.

Jump to

Keyboard shortcuts

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