filtering

package
v0.1.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockFilter

type BlockFilter struct {
	IncludeProgram              *CELFilter
	ExcludeProgram              *CELFilter
	SystemActionsIncludeProgram *CELFilter
}

func NewBlockFilter

func NewBlockFilter(includeProgramCode, excludeProgramCode, systemActionsIncludeProgramCode string) (*BlockFilter, error)

func (*BlockFilter) TransformInPlace

func (f *BlockFilter) TransformInPlace(blk *bstream.Block) error

TransformInPlace received a `bstream.Block` pointer, unpack it's native counterpart, a `pbcodec.Block` pointer in our case and transforms it in place, modifiying the pointed object. This means that future `ToNative()` calls on the bstream block will return a filtered version of this block.

*Important* This method expect that the caller will peform the transformation in lock step, there is no lock

performed by this method. It's the caller responsibility to deal with concurrency issues.

type CELFilter

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

func (*CELFilter) IsNoop

func (f *CELFilter) IsNoop() bool

type FilteringPreprocessor

type FilteringPreprocessor struct {
	Filter *BlockFilter
}

func (*FilteringPreprocessor) PreprocessBlock

func (f *FilteringPreprocessor) PreprocessBlock(blk *bstream.Block) (interface{}, error)

Jump to

Keyboard shortcuts

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