parsers

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: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditParser

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

func (*AuditParser) Parse

func (p *AuditParser) Parse(line string) (map[string]interface{}, error)

type AuditParserFactory

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

func (*AuditParserFactory) Init

func (pf *AuditParserFactory) Init(options map[string]interface{}) error

func (*AuditParserFactory) New

func (pf *AuditParserFactory) New() Parser

type GlogParser

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

func (*GlogParser) Parse

func (p *GlogParser) Parse(line string) (map[string]interface{}, error)

TODO: we should support concatenating multiline log statements, because kube api server logs, for example, contain lines such as the following (ugh). I0720 00:23:31.949027 5 trace.go:61] Trace "GuaranteedUpdate etcd3: *api.Node" (started 2017-07-20 00:23:30.517702742 +0000 UTC): [68.006µs] [68.006µs] initial value restored [1.03334ms] [965.334µs] Transaction prepared [1.431248874s] [1.430215534s] Transaction committed "GuaranteedUpdate etcd3: *api.Node" [1.431304615s] [55.741µs] END

type GlogParserFactory

type GlogParserFactory struct{}

func (*GlogParserFactory) Init

func (pf *GlogParserFactory) Init(options map[string]interface{}) error

func (*GlogParserFactory) New

func (pf *GlogParserFactory) New() Parser

type JSONParser

type JSONParser struct{}

Parses line as JSON

func (*JSONParser) Parse

func (p *JSONParser) Parse(line string) (map[string]interface{}, error)

type JSONParserFactory

type JSONParserFactory struct{}

func (*JSONParserFactory) Init

func (pf *JSONParserFactory) Init(options map[string]interface{}) error

func (*JSONParserFactory) New

func (pf *JSONParserFactory) New() Parser

type KeyvalParser

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

func (*KeyvalParser) Parse

func (p *KeyvalParser) Parse(line string) (map[string]interface{}, error)

type KeyvalParserFactory

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

func (*KeyvalParserFactory) Init

func (pf *KeyvalParserFactory) Init(options map[string]interface{}) error

func (*KeyvalParserFactory) New

func (pf *KeyvalParserFactory) New() Parser

type NginxParser

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

func (*NginxParser) Parse

func (p *NginxParser) Parse(line string) (map[string]interface{}, error)

type NginxParserFactory

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

func (*NginxParserFactory) Init

func (pf *NginxParserFactory) Init(options map[string]interface{}) error

func (*NginxParserFactory) New

func (pf *NginxParserFactory) New() Parser

type NoOpParser

type NoOpParser struct{}

Doesn't do any parsing

func (*NoOpParser) Parse

func (p *NoOpParser) Parse(line string) (map[string]interface{}, error)

type NoOpParserFactory

type NoOpParserFactory struct{}

func (*NoOpParserFactory) Init

func (pf *NoOpParserFactory) Init(options map[string]interface{}) error

func (*NoOpParserFactory) New

func (pf *NoOpParserFactory) New() Parser

type Parser

type Parser interface {
	Parse(line string) (map[string]interface{}, error)
}

type ParserFactory

type ParserFactory interface {
	Init(options map[string]interface{}) error
	New() Parser
}

func NewParserFactory

func NewParserFactory(config *config.ParserConfig) (ParserFactory, error)

type RedisParser

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

func (*RedisParser) Parse

func (p *RedisParser) Parse(line string) (map[string]interface{}, error)

type RedisParserFactory

type RedisParserFactory struct{}

func (*RedisParserFactory) Init

func (pf *RedisParserFactory) Init(options map[string]interface{}) error

func (*RedisParserFactory) New

func (pf *RedisParserFactory) New() Parser

type RegexFactory added in v1.4.0

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

func (*RegexFactory) Init added in v1.4.0

func (rf *RegexFactory) Init(options map[string]interface{}) error

func (*RegexFactory) New added in v1.4.0

func (rf *RegexFactory) New() Parser

type RegexParser added in v1.4.0

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

func (*RegexParser) Parse added in v1.4.0

func (rp *RegexParser) Parse(line string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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