filters

package
Version: v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FilterPluginNames = []string{
	"nop",
	"sample",
}

Functions

This section is empty.

Types

type Filter

type Filter int
const (
	NopFilter Filter = iota
	SampleFilter
)

func FilterFromName

func FilterFromName(name string) (Filter, error)

func (Filter) String

func (filter Filter) String() string

type FilterPlugin

type FilterPlugin interface {

	// New creates a new FilterPlugin instance with the
	// given name and configuration.
	New(name string, config map[string]interface{}) (FilterPlugin, error)

	// Filter executes the filter.
	Filter(event common.MapStr) (common.MapStr, error)

	// String returns the name of the filter.
	String() string

	// Type returns the type of the filter.
	Type() Filter
}

The FilterPlugin interface needs to be implemented by all the filtering plugins.

type FiltersList

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

Contains a list of the available filter plugins.

var Filters FiltersList

func (FiltersList) Get

func (filters FiltersList) Get(filter Filter) FilterPlugin

func (FiltersList) Register

func (filters FiltersList) Register(filter Filter, plugin FilterPlugin)

Source Files

Directories

Path Synopsis
Package nop implements a Packetbeat filter that does absolutely nothing.
Package nop implements a Packetbeat filter that does absolutely nothing.

Jump to

Keyboard shortcuts

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