filter

package
v0.0.0-...-918558c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element interface {
	Type() ElementType
}

type ElementType

type ElementType uint8
const (
	Primitive ElementType = iota
	Composite
	Joiner
)

type Expression

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

func NewExpression

func NewExpression(s string) *Expression

func (*Expression) Compile

func (e *Expression) Compile() Filter

Compile build an abstract syntax tree of the expression, implemented in a Filter.

func (*Expression) HasNext

func (e *Expression) HasNext() bool

func (*Expression) Next

func (e *Expression) Next() Element

Next get the next element. If none left, return nil. It might return a primitive, a composite or a joiner.

type ExpressionToken

type ExpressionToken int

type Filter

type Filter interface {
	Compile() ([]bpf.Instruction, error)
	Equal(o Filter) bool
	Size() uint8
	IsPrimitive() bool
	Type() ElementType
	Distill() Filter
}

Filter constructed of a tcpdump filter expression

type Filters

type Filters []Filter

func (Filters) Equal

func (f Filters) Equal(o Filters) bool

func (Filters) Len

func (f Filters) Len() int

func (Filters) Less

func (f Filters) Less(i, j int) bool

func (Filters) Swap

func (f Filters) Swap(i, j int)

Jump to

Keyboard shortcuts

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