rfc5424

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rfc5424 is a state-machine parser of RFC5424-formatted log lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delimiter

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

Delimiter splits incoming data on RFC5424 headers.

func NewDelimiter

func NewDelimiter(r io.Reader) *Delimiter

NewDelimiter returns an instance of a Delimiter.

func (*Delimiter) ReadLine

func (d *Delimiter) ReadLine() (string, error)

ReadLine() returns a line beginning with an RFC5424 header, and includes all characters up to and including the last character before the start of the next RFC5424 header. Any trailing newline characters are stripped from the line before it is returned.

type Parser

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

Parser parses an RFC5424-compliant log message.

func NewParser

func NewParser() *Parser

NewParser returns an instance of a Parser.

type Reader

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

Reader wraps an io.Reader object and returns valid RFC5424 log messages.

func NewReader

func NewReader(rdr io.Reader) *Reader

NewReader returns a Reader wrapping an io.Reader.

func (*Reader) ReadLine

func (r *Reader) ReadLine() (string, error)

ReadLine returns the next valid RFC5424 log message.

Jump to

Keyboard shortcuts

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