Documentation ¶
Overview ¶
Package dummy implements a dummy skeleton logtailer profile for demonstration purposes.
This profile does not modify input lines and simply prints them to stdout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyProfile ¶
type DummyProfile struct{}
DummyProfile provides a stripped down example of how to write a logtailer profile.
func (*DummyProfile) HandleOutput ¶
func (p *DummyProfile) HandleOutput(records <-chan interface{}, dryRun bool) <-chan error
HandleOutput recieves a channel of input lines and a flag of whether or not this is a dry run being invoked (to avoid side-effects).
The return value is a channel of errors. parse.com/logtailer keeps track of the number of errors and exits non-zero if they are over a threshold.
func (*DummyProfile) Init ¶
func (p *DummyProfile) Init() error
Init does nothing in the dummy profile, but is here to satisfy the interface
func (*DummyProfile) Name ¶
func (p *DummyProfile) Name() string
Name returns the name of the profile and must be unique amongst registered. profiles
func (*DummyProfile) ProcessRecord ¶
func (p *DummyProfile) ProcessRecord(record string) (interface{}, error)
ProcessRecord is invoked for every input log line. It returns a transformed. line or an error