filter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledFilter

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

CompiledFilter represents a compiled CEL expression ready for evaluation.

func Compile

func Compile(expr string) (*CompiledFilter, error)

Compile parses and compiles a CEL expression for filtering log entries. Returns nil if the expression is empty.

func CompileWithFields

func CompileWithFields(expr string, fields []string) (*CompiledFilter, error)

CompileWithFields parses and compiles a CEL expression with specific field names.

func (*CompiledFilter) Match

func (f *CompiledFilter) Match(fields map[string]any) bool

Match evaluates the filter against the given fields map. Returns true if the entry matches the filter.

Jump to

Keyboard shortcuts

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