parser

package
v0.0.0-...-584518c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLineSource

type FileLineSource struct {
	Err error
	// contains filtered or unexported fields
}

func NewFileLineSource

func NewFileLineSource(filename string) (p *FileLineSource)

func (*FileLineSource) Lines

func (p *FileLineSource) Lines() <-chan string

type GrokParser

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

func NewGrokParser

func NewGrokParser(linesource LineSource, pattern string, timeLayout string, predicate logentry.Predicate) (p *GrokParser)

func (*GrokParser) AddPattern

func (p *GrokParser) AddPattern(name string, pattern string)

func (*GrokParser) Parse

func (p *GrokParser) Parse() <-chan logentry.LogEntry

type LineSource

type LineSource interface {
	Lines() <-chan string
}

type Parser

type Parser interface {
	Parse() <-chan logentry.LogEntry
}

type SimpleLineSource

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

func NewSimpleLineSource

func NewSimpleLineSource() *SimpleLineSource

func (*SimpleLineSource) AddLine

func (ls *SimpleLineSource) AddLine(line string)

func (*SimpleLineSource) Lines

func (ls *SimpleLineSource) Lines() <-chan string

type SimpleParser

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

converts one line into one message, so it doesn't actually parse something

func NewSimpleParser

func NewSimpleParser(linesource LineSource, predicate logentry.Predicate) (p *SimpleParser)

func (*SimpleParser) Parse

func (p *SimpleParser) Parse() <-chan logentry.LogEntry

Jump to

Keyboard shortcuts

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