filter

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 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 FilterOperator

type FilterOperator struct {
	helper.TransformerOperator
	// contains filtered or unexported fields
}

FilterOperator is an operator that filters entries based on matching expressions

func (*FilterOperator) Process

func (f *FilterOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will drop incoming entries that match the filter expression

type FilterOperatorConfig

type FilterOperatorConfig struct {
	helper.TransformerConfig `yaml:",inline"`
	Expression               string  `json:"expr"   yaml:"expr"`
	DropRatio                float64 `json:"drop_ratio"   yaml:"drop_ratio"`
}

FilterOperatorConfig is the configuration of a filter operator

func NewFilterOperatorConfig

func NewFilterOperatorConfig(operatorID string) *FilterOperatorConfig

NewFilterOperatorConfig creates a filter operator config with default values

func (FilterOperatorConfig) Build

Build will build a filter operator from the supplied configuration

Jump to

Keyboard shortcuts

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