handlers

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 3

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

type LineHandlerImpl

type LineHandlerImpl struct {
	// contains filtered or unexported fields
}

func (*LineHandlerImpl) Handle

func (h *LineHandlerImpl) Handle(rawLine string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL