filter

package
v0.4.23 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxExpressionLength is the maximum allowed length for a CEL expression
	MaxExpressionLength = 1000

	// EvaluationTimeout is the maximum time allowed to evaluate a single resource
	EvaluationTimeout = 100 * time.Millisecond

	// MaxCacheSize is the maximum number of compiled programs to cache
	MaxCacheSize = 100

	// CacheTTL is the time-to-live for cached programs
	CacheTTL = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CELFilter

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

CELFilter implements ResourceFilter using Common Expression Language

func NewCELFilter

func NewCELFilter() (*CELFilter, error)

NewCELFilter creates a new CEL-based resource filter

func (*CELFilter) Filter

func (f *CELFilter) Filter(ctx context.Context, resources []model.Resource, expression string) ([]model.Resource, error)

Filter applies a CEL expression filter to resources

Jump to

Keyboard shortcuts

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