Documentation ¶
Index ¶
- type Event
- func (e *Event) AddTag(tag string)
- func (e *Event) Get(key string) interface{}
- func (e *Event) GetMessage() string
- func (e *Event) GetTags() []string
- func (e *Event) GetTimestamp() time.Time
- func (e *Event) GetType() string
- func (e *Event) HasTag(tag string) bool
- func (e *Event) RemoveField(key string)
- func (e *Event) RemoveTag(tag string)
- func (e *Event) ResetTags()
- func (e *Event) Set(key string, val interface{})
- func (e *Event) SetMessage(s string)
- func (e *Event) SetTags(tags []string)
- func (e *Event) SetTimestamp(t time.Time)
- func (e *Event) SetType(val string)
- func (e *Event) Squash() *utils.InterfaceMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
An Event is the primary data structure passed around the system. An input creates an Event which is sent to the filter pipeline and eventually out to the output pipeline.
The fields @timestamp, message, type, and tags are protected and should be manipulated using the corresponding Get and Set methods. If any of these fields are manipulated using the generic Get/Set methods, the request will be directed to the correct Get/Set method.
func New ¶
New creates a new Event object setting its message to message. @timestamp is set to time.Now() and tags and data are empty.
func (*Event) GetMessage ¶
GetMessage returns the current message.
func (*Event) GetTimestamp ¶
GetTimestamp returns the Events canonical timestamp.
func (*Event) RemoveField ¶
RemoveField deletes the field key
func (*Event) SetMessage ¶
SetMessage sets the Event message to s. Setting the message to an empty string will remove it from output.
func (*Event) SetTimestamp ¶
SetTimestamp sets the Event's canonical timestamp.
func (*Event) Squash ¶
func (e *Event) Squash() *utils.InterfaceMap
Squash reduces the Event to an InterfaceMap where the map keys are the Event's field names. The returned map is safe for the caller to manipulate as it's a copy of the underlying map in the Event. This method is intented for output/codecs modules to encode the Event.