decoders

package
v0.0.0-...-2081a44 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMessageError = DecodingError(eerrors.New("Empty message"))
View Source
var ErrInvalidPriority = DecodingError(eerrors.New("Invalid priority field"))
View Source
var ErrInvalidSD = DecodingError(eerrors.New("Invalid structured data"))
View Source
var ErrInvalidTimestamp = DecodingError(eerrors.New("TimeReported and TimeGenerated should be formatted in RFC3339 format"))

Functions

func DecodingError

func DecodingError(err error) error

func ErrorUnknownFormat

func ErrorUnknownFormat(format string) error

func FromGelfMessage

func FromGelfMessage(gelfm *gelf.Message) (msg *model.SyslogMessage)

func FullFromGelfMessage

func FullFromGelfMessage(gelfm *gelf.Message) (msg *model.FullMessage)

func InfluxDecodingError

func InfluxDecodingError(err error) error

func InvalidCharsetError

func InvalidCharsetError(err error) error

func InvalidTopicError

func InvalidTopicError(topic string) error

func NotEnoughPartsError

func NotEnoughPartsError(nb int) error

func RFC5424DecodingError

func RFC5424DecodingError(err error) error

func UnmarshalJsonError

func UnmarshalJsonError(err error) error

func W3CDecoder

func W3CDecoder(fieldNames string) func([]byte) ([]*model.SyslogMessage, error)

W3CDecoder makes a Extended Log Format decoder from given field names

func W3CDecodingError

func W3CDecodingError(err error) error

Types

type BaseParser

type BaseParser func([]byte) ([]*model.SyslogMessage, error)

type Parser

type Parser interface {
	Parse(m []byte) ([]*model.SyslogMessage, error)
	Release()
}

type ParsersEnv

type ParsersEnv struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ParsersEnv encapsulates JS and Golang parsers.

func NewParsersEnv

func NewParsersEnv(config []conf.ParserConfig, logger log15.Logger) *ParsersEnv

func (*ParsersEnv) Parse

func (e *ParsersEnv) Parse(c *conf.DecoderBaseConfig, m []byte) ([]*model.SyslogMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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