filter

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

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

Go to latest
Published: May 2, 2016 License: Apache-2.0 Imports: 4 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

This section is empty.

Types

type DropFields

type DropFields struct {
	Fields []string
}

extend FilterRule

func NewDropFields

func NewDropFields(fields []string) *DropFields

DropFields methods

func (*DropFields) Filter

func (f *DropFields) Filter(event common.MapStr) (common.MapStr, error)

func (*DropFields) String

func (f *DropFields) String() string

type DropFieldsConfig

type DropFieldsConfig struct {
	Fields []string `config:"fields"`
}

type FilterCondition

type FilterCondition struct {
}

type FilterConfig

type FilterConfig struct {
	DropFields    *DropFieldsConfig    `config:"drop_fields"`
	IncludeFields *IncludeFieldsConfig `config:"include_fields"`
}

type FilterList

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

func New

func New(config []FilterConfig) (*FilterList, error)

FilterList methods

func (*FilterList) Filter

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

Applies a sequence of filtering rules and returns the filtered event

func (*FilterList) Get

func (filters *FilterList) Get(index int) FilterRule

func (*FilterList) Register

func (filters *FilterList) Register(filter FilterRule)

func (*FilterList) String

func (filters *FilterList) String() string

type FilterRule

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

type IncludeFields

type IncludeFields struct {
	Fields []string
}

extends FilterRule

func NewIncludeFields

func NewIncludeFields(fields []string) *IncludeFields

IncludeFields methods

func (*IncludeFields) Filter

func (f *IncludeFields) Filter(event common.MapStr) (common.MapStr, error)

func (*IncludeFields) String

func (f *IncludeFields) String() string

type IncludeFieldsConfig

type IncludeFieldsConfig struct {
	Fields []string `config:"fields"`
}

Jump to

Keyboard shortcuts

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