syslog

package
v0.0.0-...-c38d673 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectType

func DetectType(data []byte) (detected int)

func NewParser

func NewParser(c conf.MapConf) (parser.Parser, error)

Types

type Automatic

type Automatic struct{}

func (*Automatic) GetParser

func (f *Automatic) GetParser(line []byte) Parser

func (*Automatic) IsNewLine

func (f *Automatic) IsNewLine(data []byte) bool

type Format

type Format interface {
	GetParser([]byte) Parser
	IsNewLine(data []byte) bool
}

func GetFormt

func GetFormt(format string) Format

type LogParts

type LogParts map[string]interface{}

type Parser

type Parser interface {
	Parse() error
	Dump() LogParts
	Location(*time.Location)
}

type RFC3164

type RFC3164 struct{}

func (*RFC3164) GetParser

func (f *RFC3164) GetParser(line []byte) Parser

func (*RFC3164) IsNewLine

func (f *RFC3164) IsNewLine(data []byte) bool

type RFC5424

type RFC5424 struct{}

func (*RFC5424) GetParser

func (f *RFC5424) GetParser(line []byte) Parser

func (*RFC5424) IsNewLine

func (f *RFC5424) IsNewLine(data []byte) bool

type RFC6587

type RFC6587 struct{}

func (*RFC6587) GetParser

func (f *RFC6587) GetParser(line []byte) Parser

func (*RFC6587) IsNewLine

func (f *RFC6587) IsNewLine(data []byte) bool

type SyslogParser

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

func (*SyslogParser) Flush

func (p *SyslogParser) Flush() (data Data, err error)

func (*SyslogParser) Name

func (p *SyslogParser) Name() string

func (*SyslogParser) Parse

func (p *SyslogParser) Parse(lines []string) ([]Data, error)

func (*SyslogParser) Type

func (p *SyslogParser) Type() string

Jump to

Keyboard shortcuts

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