Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONBuilder ¶
type JSONBuilder struct {
fbcontext.ContextAware
}
JSONBuilder is a firebolt `node.SyncNode` for building JSON extracts 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 (*JSONBuilder) Process ¶
Process takes the inbound `msg`, a captainslog.SyslogMsg, and builds a JSON string from it, returning that string as a []byte.
func (*JSONBuilder) Receive ¶
func (j *JSONBuilder) Receive(msg fbcontext.Message) error
Receive handles a message from another node or an external source. This example doesn't use messaging.
func (*JSONBuilder) Setup ¶
func (j *JSONBuilder) Setup(config map[string]string) error
Setup is a no-op in jsonbuilder. This is where you'd do any one-time setup, like establishing a db connection or populating a cache.
func (*JSONBuilder) Shutdown ¶
func (j *JSONBuilder) Shutdown() error
Shutdown is a no-op in jsonbuilder. 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.