Versions in this module Expand all Collapse all v1 v1.3.4 Sep 18, 2021 v1.3.3 Dec 28, 2020 v1.3.2 Oct 15, 2020 v1.3.1 Aug 2, 2019 Changes in this version + const NILVALUE + const NO_VERSION + const PRI_PART_END + const PRI_PART_START + var ErrDayInvalid = &ParserError + var ErrEOL = &ParserError + var ErrHourInvalid = &ParserError + var ErrInvalidAppName = &ParserError + var ErrInvalidMsgId = &ParserError + var ErrInvalidProcId = &ParserError + var ErrInvalidTimeFormat = &ParserError + var ErrMinuteInvalid = &ParserError + var ErrMonthInvalid = &ParserError + var ErrNoSpace = &ParserError + var ErrNoStructuredData = &ParserError + var ErrPriorityEmpty = &ParserError + var ErrPriorityNoEnd = &ParserError + var ErrPriorityNoStart = &ParserError + var ErrPriorityNonDigit = &ParserError + var ErrPriorityTooLong = &ParserError + var ErrPriorityTooShort = &ParserError + var ErrSecFracInvalid = &ParserError + var ErrSecondInvalid = &ParserError + var ErrTimeZoneInvalid = &ParserError + var ErrTimestampUnknownFormat = &ParserError + var ErrVersionNotFound = &ParserError + var ErrYearInvalid = &ParserError + func IsDigit(c byte) bool + func Parse2Digits(bs []byte, min int, max int, e error) ([]byte, int, error) + func ParseHostname(bs []byte) ([]byte, string) + func ParseTag(bs []byte) ([]byte, string) + func ParseTimestamp(bs []byte) ([]byte, time.Time, error) + func ParseVersion(bs []byte) ([]byte, int, error) + func ShowCursorPos(buff []byte, cursor int) type Event + func (e *Event) Data() interface{} + func (e *Event) ID() ekanite.DocID + type Facility struct + Value int + type LogParser struct + Raw []byte + Result map[string]interface{} + func NewLogParser(f string) (*LogParser, error) + func (p *LogParser) Parse(address string, b []byte) type Parser + func CreateParser(format string) Parser + type ParserError struct + ErrorString string + func (err *ParserError) Error() string + type Priority struct + F Facility + P int + S Severity + func ParsePriority(bs []byte) ([]byte, Priority, error) + type RFC5424V2 struct + type Severity struct + Value int v1.3.0 Nov 27, 2017 v1.2.3 Jul 6, 2017 v1.2.2 Jun 25, 2017 v1.2.1 Jun 17, 2017 v1.2.0 Jan 4, 2017 v1.1.1 Oct 7, 2016 v1.1.0 Sep 3, 2016 Changes in this version + func ValidFormat(format string) bool + type NetstrDelimiter struct + Result string + func NewNetstrDelimiter() *NetstrDelimiter + func (d *NetstrDelimiter) Push(b byte) (bool, error) + func (d *NetstrDelimiter) Reset() + type Parser struct + Raw []byte + Result map[string]interface{} + func NewParser(f string) (*Parser, error) + func (p *Parser) Parse(b []byte) bool + type RFC5424 struct + type SyslogDelimiter struct + func NewSyslogDelimiter(maxSize int) *SyslogDelimiter + func (s *SyslogDelimiter) Push(b byte) (string, bool) + func (s *SyslogDelimiter) Vestige() (string, bool) v1.0.0 Apr 10, 2016 Changes in this version + const SYSLOG_DELIMITER + type ApacheCommonFormat struct + Method string + Referer string + StatusCode int + URL string + type Collector interface + Addr func() net.Addr + Start func(chan<- *Event) error + func NewCollector(proto, iface string, tlsConfig *tls.Config) Collector + type Delimiter struct + func NewDelimiter(maxSize int) *Delimiter + func (self *Delimiter) Push(b byte) (string, bool) + func (self *Delimiter) Vestige() (string, bool) + type Event struct + Parsed *RFC5424Message + ReceptionTime time.Time + Sequence int64 + SourceIP string + Text string + func NewEvent() *Event + func (e *Event) ReferenceTime() time.Time + type RFC5424Message struct + App string + Host string + Message string + MsgId string + Pid int + Priority int + Timestamp string + Version int + type RFC5424Parser struct + func NewRFC5424Parser() *RFC5424Parser + func (p *RFC5424Parser) Parse(raw string) *RFC5424Message + type TCPCollector struct + func (s *TCPCollector) Addr() net.Addr + func (s *TCPCollector) Start(c chan<- *Event) error + type UDPCollector struct + func (s *UDPCollector) Addr() net.Addr + func (s *UDPCollector) Start(c chan<- *Event) error