Documentation
¶
Overview ¶
Package messagefilter is a small smart-filter expression engine for Kafka messages (task MSG-24). It compiles a predicate expression into a Filter that can be evaluated against api.Message values.
Grammar (recursive descent, no external deps):
expr := orExpr
orExpr := andExpr ( ("OR"|"or"|"||") andExpr )*
andExpr := comparison ( ("AND"|"and"|"&&") comparison )*
comparison := "(" expr ")" | field OP operand
field := key | value | partition | offset | header.NAME | headers.NAME
OP := contains | == | != | > | < | >= | <=
operand := "quoted" | 'quoted' | number | bareword
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a compiled smart-filter expression.
Click to show internal directories.
Click to hide internal directories.