Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FilterPluginNames = []string{
"nop",
"sample",
}
Functions ¶
Types ¶
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.
func LoadConfiguredFilters ¶
func LoadConfiguredFilters(config map[string]interface{}) ([]FilterPlugin, error)
LoadConfiguredFilters interprets the filters configuration, loads the configured plugins and returns the order in which they need to be executed.
type FilterRunner ¶
type FilterRunner struct { FiltersQueue chan common.MapStr // contains filtered or unexported fields }
Executes the filters
func NewFilterRunner ¶
func NewFilterRunner(results chan common.MapStr, order []FilterPlugin) *FilterRunner
Create a new FilterRunner
func (*FilterRunner) Run ¶
func (runner *FilterRunner) Run() error
Goroutine that reads the objects from the FiltersQueue, executes all filters on them and writes the modified objects in the results channel.
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)
Click to show internal directories.
Click to hide internal directories.