keyval

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package keyval parses logs whose format is many key=val pairs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValLineParser

type KeyValLineParser struct {
}

func (*KeyValLineParser) ParseLine

func (j *KeyValLineParser) ParseLine(line string) (map[string]interface{}, error)

type Options

type Options struct {
	TimeFieldName   string `long:"timefield" description:"Name of the field that contains a timestamp"`
	TimeFieldFormat string `long:"format" description:"Format of the timestamp found in timefield (supports strftime and Golang time formats)"`
	FilterRegex     string `long:"filter_regex" description:"a regular expression that will filter the input stream and only parse lines that match"`
	InvertFilter    bool   `long:"invert_filter" description:"change the filter_regex to only process lines that do *not* match"`

	NumParsers int `hidden:"true" description:"number of keyval parsers to spin up"`
}

type Parser

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

func (*Parser) Init

func (p *Parser) Init(options interface{}) error

func (*Parser) ProcessLines

func (p *Parser) ProcessLines(lines <-chan string, send chan<- event.Event, prefixRegex *parsers.ExtRegexp)

Jump to

Keyboard shortcuts

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