cel

package
v1.8.8-0...-edaca3c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cel provides a small wrapper around CEL expression compilation and evaluation used to compare map-based keys within SOP components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

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

Evaluator holds a CEL expression and compiled program used to compare map-based keys.

func NewEvaluator

func NewEvaluator(name string, expression string) (*Evaluator, error)

NewEvaluator compiles a CEL expression that can compare mapX and mapY values and returns an Evaluator. Both mapX and mapY are expected to be map[string]any variables in the program context.

func (*Evaluator) Evaluate

func (e *Evaluator) Evaluate(mapX map[string]any, mapY map[string]any) (int, error)

Evaluate executes the compiled CEL expression against the provided mapX and mapY and returns an int result.

Jump to

Keyboard shortcuts

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