filter

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

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

Go to latest
Published: Jun 30, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

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