Documentation ¶
Overview ¶
Package filter contains the interfaces, structs, and logic that form the basis of protonds filter plugin subsystem.
Protond currently implements the following filter plugins:
- Noop
- A no operation filter which just returns the event unchanged, this is used for pass through protond relays and testing protond.
- Javascript
- This plugin allows for arbitrary javascript scripts that can modify and call certain functions on all events.
Index ¶
Constants ¶
View Source
const ( // NoopFilter defines a filter that does nothing. NoopFilter = "noop" // JavascriptFilter defines a javascript based filter. JavascriptFilter = "js" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter interface { // Run should take in the supplied event and preform the filtering, and then return the filtered event and a nil error object, if there is an error during the process the returned event should be the unchanged supplied event and the error object should contain the error. Run(*common.Event) (*common.Event, error) // Name returns the name of the filter plugin. Name() string }
Filter is the interface that plugins must adhere to for operation as a filter plugin.
type Javascript ¶
type Javascript struct {
// contains filtered or unexported fields
}
Javascript is a struct representing the javascript filter plugin.
func (*Javascript) Name ¶
func (js *Javascript) Name() string
Name returns configured name for the javascript filter.
Click to show internal directories.
Click to hide internal directories.