Documentation
¶
Index ¶
- type Base
- type Cache
- type Changed
- type Echo
- type ElasticSearch
- type File
- type Filter
- func NewCacheFilter(p map[string]string) (Filter, error)
- func NewChangedFilter(p map[string]string) (Filter, error)
- func NewEchoFilter(p map[string]string) (Filter, error)
- func NewElasticSearchFilter(p map[string]string) (Filter, error)
- func NewFileFilter(params map[string]string) (Filter, error)
- func NewFilter(rule string, name string, conf map[string]string, bus EventBus.Bus, id int32, ...) (Filter, error)
- func NewFormatFilter(p map[string]string) (Filter, error)
- func NewHTMLFilter(p map[string]string) (Filter, error)
- func NewHTTPFilter(p map[string]string) (Filter, error)
- func NewHashFilter(p map[string]string) (Filter, error)
- func NewJSONFilter(p map[string]string) (Filter, error)
- func NewJsFilter(p map[string]string) (Filter, error)
- func NewMailFilter(p map[string]string) (Filter, error)
- func NewMimetypeFilter(p map[string]string) (Filter, error)
- func NewOverrideFilter(p map[string]string) (Filter, error)
- func NewPDFFilter(p map[string]string) (Filter, error)
- func NewRandomFilter(p map[string]string) (Filter, error)
- func NewRateLimitFilter(p map[string]string) (Filter, error)
- func NewSlackFilter(p map[string]string) (Filter, error)
- func NewStripTagFilter(p map[string]string) (Filter, error)
- func NewSystemFilter(p map[string]string) (Filter, error)
- func NewTextFilter(p map[string]string) (Filter, error)
- func NewURLFilter(p map[string]string) (Filter, error)
- func NewXLSFilter(p map[string]string) (Filter, error)
- type FilterFactory
- type Format
- type HTML
- type HTTP
- type Hash
- type JSON
- type Js
- type Mail
- type Mimetype
- type Override
- type PDF
- type Random
- type RateLimit
- type Slack
- type StripTag
- type System
- type Text
- type URL
- type XLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base is inherited from the feeders
func (*Base) GetIdentifier ¶
GetIdentifier returns the Node identifier ID used in the bus
func (*Base) Log ¶ added in v0.8.2
Log print a debug line prepending the name of the rule and of the filter
func (*Base) Pipe ¶
Pipe gets a Message from the previous Node and Propagate it to the next one if the Filter's callback will return true
type Cache ¶
Cache handles a cache usable in the rule
type Changed ¶
Changed is a Filter that call the propagation method only if the input Message is different from the previous one
type Echo ¶
type Echo struct { Base // contains filtered or unexported fields }
Echo is a filter that print the input Message on the logs.
type ElasticSearch ¶ added in v1.8.2
type ElasticSearch struct { Base // contains filtered or unexported fields }
ElasticSearch is a filter that imports JSON documents in an Elastsic Search database.
func (*ElasticSearch) DoFilter ¶ added in v1.8.2
func (f *ElasticSearch) DoFilter(msg *data.Message) (bool, error)
DoFilter is the mandatory method used to "filter" the input data.Message
func (*ElasticSearch) OnEvent ¶ added in v1.8.2
func (f *ElasticSearch) OnEvent(event *data.Event)
OnEvent is called when an event occurs
type File ¶ added in v1.8.2
type File struct { Base // contains filtered or unexported fields }
File is a filter that interprets the input Message as a file path, reads it and prints it.
type Filter ¶
type Filter interface { Rule() string Name() string DoFilter(msg *data.Message) (bool, error) Pipe(msg *data.Message) GetIdentifier() string Log(format string, args ...interface{}) OnEvent(e *data.Event) // contains filtered or unexported methods }
Filter defines Base methods of the object
func NewCacheFilter ¶
NewCacheFilter is the registered method to instantiate a CacheFilter
func NewChangedFilter ¶
NewChangedFilter is the registered method to instantiate a ChangedFilter
func NewEchoFilter ¶
NewEchoFilter is the registered method to instantiate a EchoFilter
func NewElasticSearchFilter ¶ added in v1.8.2
NewElasticSearchFilter is the registered method to instantiate a ElasticSearchFilter
func NewFileFilter ¶ added in v1.8.2
NewFileFilter is the registered method to instantiate a File filter
func NewFilter ¶
func NewFilter(rule string, name string, conf map[string]string, bus EventBus.Bus, id int32, neg bool) (Filter, error)
NewFilter creates a new registered Filter from it's name
func NewFormatFilter ¶
NewFormatFilter is the registered method to instantiate a FormatFilter
func NewHTMLFilter ¶ added in v1.14.0
NewHTMLFilter is the registered method to instantiate a HtmlFilter
func NewHTTPFilter ¶
NewHTTPFilter is the registered method to instantiate a HttpFilter
func NewHashFilter ¶
NewHashFilter is the registered method to instantiate a HashFilter
func NewJSONFilter ¶ added in v1.20.0
NewJSONFilter is the registered method to instantiate a JSONFilter
func NewJsFilter ¶
NewJsFilter is the registered method to instantiate a JsFilter
func NewMailFilter ¶
NewMailFilter is the registered method to instantiate a MailFilter
func NewMimetypeFilter ¶ added in v0.8.1
NewMimetypeFilter is the registered method to instantiate a MimetypeFilter
func NewOverrideFilter ¶
NewOverrideFilter is the registered method to instantiate a OverrideFilter
func NewPDFFilter ¶ added in v0.8.1
NewPDFFilter is the registered method to instantiate a TextFilter
func NewRandomFilter ¶ added in v0.8.2
NewRandomFilter is the registered method to instantiate a RandomFilter
func NewRateLimitFilter ¶ added in v1.20.0
NewRateLimitFilter is the registered method to instantiate a RateLimit Filter
func NewSlackFilter ¶ added in v0.9.1
NewSlackFilter is the registered method to instantiate a MailFilter
func NewStripTagFilter ¶ added in v1.4.0
NewStripTagFilter is the registered method to instantiate a StripTagFilter
func NewSystemFilter ¶
NewSystemFilter is the registered method to instantiate a SystemFilter
func NewTextFilter ¶
NewTextFilter is the registered method to instantiate a TextFilter
func NewURLFilter ¶
NewURLFilter is the registered method to instantiate a UrlFilter
type FilterFactory ¶
FilterFactory identifies a function to instantiate a Filter using the Factory
type Format ¶
type Format struct { Base // contains filtered or unexported fields }
Format is a Filter that apply a Golang Template to the input Message and propagate it to the next Filter
type HTML ¶ added in v1.14.0
type HTML struct { Base // contains filtered or unexported fields }
HTML is a filter to parse the HTML format
type HTTP ¶
type HTTP struct { Base // contains filtered or unexported fields }
HTTP is a filter to handle http requests using the input Message
type Hash ¶
type Hash struct { Base // contains filtered or unexported fields }
Hash is a Filter that searches for hashes in the Message
type JSON ¶ added in v1.20.0
type JSON struct { Base // contains filtered or unexported fields }
JSON is a filter to parse the JSON format
type Js ¶
type Js struct { Base // contains filtered or unexported fields }
Js is a Filter that load a plugin written in Javascript to create a custom Filter
type Mail ¶
type Mail struct { Base // contains filtered or unexported fields }
Mail is a Filter to send e-mail using the input Message
type Mimetype ¶ added in v0.8.1
type Mimetype struct { Base // contains filtered or unexported fields }
Mimetype is a Filter to detect the format of an input
type Override ¶
type Override struct { Base // contains filtered or unexported fields }
Override is a Filter that allow to change the current Message before to send it to the next Filter
type PDF ¶ added in v0.8.1
type PDF struct { Base // contains filtered or unexported fields }
PDF is a Filter that extract plain text from a PDF file
type Random ¶ added in v0.8.2
type Random struct { Base // contains filtered or unexported fields }
Random is a Filter to create a random number
type RateLimit ¶ added in v1.20.0
type RateLimit struct { Base // contains filtered or unexported fields }
RateLimit is a Filter to create a RateLimit number
type Slack ¶ added in v0.9.1
type Slack struct { Base // contains filtered or unexported fields }
Slack is a Filter to send message, file to a slack channel
type StripTag ¶ added in v1.4.0
type StripTag struct { Base // contains filtered or unexported fields }
StripTag is a filter that removes HTML tags from a text.
type System ¶
type System struct { Base // contains filtered or unexported fields }
System is a Filter to exec a command on the host machine using the input Message
type Text ¶
type Text struct { Base // contains filtered or unexported fields }
Text is a Filter to search and extract strings from the input Message
type URL ¶
type URL struct { Base // contains filtered or unexported fields }
URL is a Filter to search urls in the input Message