filter

package
v5.0.0-alpha3+incompat... Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MandatoryExportedFields = []string{"@timestamp", "type"}

fields that should be always exported

Functions

func AvailableCondition

func AvailableCondition(name string) bool

func RegisterPlugin

func RegisterPlugin(name string, constructor FilterConstructor) error

Types

type Condition

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

func NewCondition

func NewCondition(config ConditionConfig) (*Condition, error)

func (*Condition) Check

func (c *Condition) Check(event common.MapStr) bool

func (Condition) String

func (c Condition) String() string

type ConditionConfig

type ConditionConfig struct {
	Equals   *ConditionFilter `config:"equals"`
	Contains *ConditionFilter `config:"contains"`
	Regexp   *ConditionFilter `config:"regexp"`
	Range    *ConditionFilter `config:"range"`
}

type ConditionFilter

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

func (*ConditionFilter) Unpack

func (f *ConditionFilter) Unpack(to interface{}) error

type EqualsValue

type EqualsValue struct {
	Int uint64
	Str string
}

func (EqualsValue) String

func (e EqualsValue) String() string

type FilterConstructor

type FilterConstructor func(config common.Config) (FilterRule, error)

type FilterPluginConfig

type FilterPluginConfig []map[string]common.Config

type FilterRule

type FilterRule interface {
	Filter(event common.MapStr) (common.MapStr, error)
	String() string
}

type Filters

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

func New

func New(config FilterPluginConfig) (*Filters, error)

func (*Filters) Filter

func (filters *Filters) Filter(event common.MapStr) common.MapStr

Applies a sequence of filtering rules and returns the filtered event

func (Filters) String

func (filters Filters) String() string

type RangeValue

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

func (RangeValue) String

func (r RangeValue) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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