processors

package
v5.6.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 10 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 Plugin

func Plugin(name string, c Constructor) map[string][]interface{}

func RegisterPlugin

func RegisterPlugin(name string, constructor Constructor)

Types

type Condition

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

func NewCondition

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

func NewConditionList

func NewConditionList(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   *ConditionFields  `config:"equals"`
	Contains *ConditionFields  `config:"contains"`
	Regexp   *ConditionFields  `config:"regexp"`
	Range    *ConditionFields  `config:"range"`
	OR       []ConditionConfig `config:"or"`
	AND      []ConditionConfig `config:"and"`
	NOT      *ConditionConfig  `config:"not"`
}

type ConditionFields

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

func (*ConditionFields) Unpack

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

type Constructor

type Constructor func(config common.Config) (Processor, error)

func NewConditional

func NewConditional(
	ruleFactory Constructor,
) Constructor

type EqualsValue

type EqualsValue struct {
	Int uint64
	Str string
}

func (EqualsValue) String

func (e EqualsValue) String() string

type Namespace

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

func NewNamespace

func NewNamespace() *Namespace

func (*Namespace) Plugin

func (ns *Namespace) Plugin() Constructor

func (*Namespace) Register

func (ns *Namespace) Register(name string, factory Constructor) error

type PluginConfig

type PluginConfig []map[string]common.Config

type Processor

type Processor interface {
	Run(event common.MapStr) (common.MapStr, error)
	String() string
}

func NewConditionRule

func NewConditionRule(
	config ConditionConfig,
	p Processor,
) (Processor, error)

type Processors

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

func New

func New(config PluginConfig) (*Processors, error)

func (*Processors) Run

func (procs *Processors) Run(event common.MapStr) common.MapStr

Applies a sequence of processing rules and returns the filtered event

func (Processors) String

func (procs Processors) String() string

type RangeValue

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

func (RangeValue) String

func (r RangeValue) String() string

type WhenProcessor

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

func (*WhenProcessor) Run

func (r *WhenProcessor) Run(event common.MapStr) (common.MapStr, error)

func (*WhenProcessor) String

func (r *WhenProcessor) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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