Documentation ¶
Overview ¶
Package handlers drives the actual processing of log lines. For each set of files that you want treated in a specific way, you create a `LineHandlerFactory`. `LineHandlerFactory.New()` then creates a new `LineHandler` for each specific file. (This mechanism lets parsers be stateful, because you end up with one parser instance per file.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineHandler ¶
type LineHandler interface {
Handle(string)
}
type LineHandlerFactory ¶
type LineHandlerFactory interface {
New(path string) LineHandler
}
type LineHandlerFactoryImpl ¶
type LineHandlerFactoryImpl struct {
// contains filtered or unexported fields
}
func NewLineHandlerFactoryFromConfig ¶
func NewLineHandlerFactoryFromConfig( config *config.WatcherConfig, unwrapper unwrappers.Unwrapper, transmitter transmission.Transmitter, extraProcessors ...processors.Processor, ) (*LineHandlerFactoryImpl, error)
func (*LineHandlerFactoryImpl) New ¶
func (hf *LineHandlerFactoryImpl) New(path string) LineHandler
type LineHandlerImpl ¶
type LineHandlerImpl struct {
// contains filtered or unexported fields
}
func (*LineHandlerImpl) Handle ¶
func (h *LineHandlerImpl) Handle(rawLine string)
Click to show internal directories.
Click to hide internal directories.