Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocBuilder ¶
type DocBuilder struct {
fbcontext.ContextAware
}
DocBuilder is a firebolt `node.SyncNode` for building elasticsearch IndexRequests from syslog messages. Because this is a `node.SyncNode`, its 'Process()' method must return immediately. A `node.AsyncNode` interface is also available for async operations such as bulk db writes.
func (*DocBuilder) Process ¶
Process takes the inbound `msg`, a captainslog.SyslogMsg, and builds a JSON string from it, returning that string as a []byte.
func (*DocBuilder) Receive ¶
func (d *DocBuilder) Receive(msg fbcontext.Message) error
Receive handles a message from another node or an external source. This example doesn't use messaging.
func (*DocBuilder) Setup ¶
func (d *DocBuilder) Setup(config map[string]string) error
Setup ensures that the target Elasticsearch index exists.
func (*DocBuilder) Shutdown ¶
func (d *DocBuilder) Shutdown() error
Shutdown is a no-op in docbuilder. This is where you'd clean up any resources on application shutdown.
type Parser ¶
type Parser struct {
fbcontext.ContextAware
}
Parser is a firebolt `node.SyncNode` for parsing syslog messages from bytes using `digitalocean/captainslog`. Because this is a `node.SyncNode`, its 'Process()' method must return immediately. A `node.AsyncNode` interface is also available for async operations such as bulk db writes.
func (*Parser) Process ¶
Process performs whatever work this node does on each event as it arrives. This example takes the inbound `msg`, which is a byte array, and parses a `captainslog.SyslogMsg` from it.
func (*Parser) Receive ¶
Receive handles a message from another node or an external source. This example doesn't use messaging.