Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionalFilter ¶
ConditionalFilter structure holds both CEL Program and variable definitions so that it can be evaluated with the new variable values
func CompileExpression ¶
func CompileExpression(expression string) (ConditionalFilter, error)
CompileExpression accepts the expression string from the Filter spec, parses variables and their types, compiles expression into CEL Program
func (*ConditionalFilter) Filter ¶
func (c *ConditionalFilter) Filter(ctx context.Context, event cloudevents.Event) eventfilter.FilterResult
Filter parses Event payload values defined as the expression variables, asserts their types, and executes CEL Program. If expression result is true, Event passes the filter.
Click to show internal directories.
Click to hide internal directories.