parser

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONParser

type JSONParser struct {
	helper.ParserOperator
	// contains filtered or unexported fields
}

JSONParser is an operator that parses JSON.

func (*JSONParser) Process

func (j *JSONParser) Process(ctx context.Context, entry *entry.Entry) error

Process will parse an entry for JSON.

type JSONParserConfig

type JSONParserConfig struct {
	helper.ParserConfig `yaml:",inline"`
}

JSONParserConfig is the configuration of a JSON parser operator.

func NewJSONParserConfig

func NewJSONParserConfig(operatorID string) *JSONParserConfig

func (JSONParserConfig) Build

Build will build a JSON parser operator.

type RegexParser

type RegexParser struct {
	helper.ParserOperator
	// contains filtered or unexported fields
}

RegexParser is an operator that parses regex in an entry.

func (*RegexParser) Process

func (r *RegexParser) Process(ctx context.Context, entry *entry.Entry) error

Process will parse an entry for regex.

type RegexParserConfig

type RegexParserConfig struct {
	helper.ParserConfig `yaml:",inline"`

	Regex string `json:"regex" yaml:"regex"`
}

RegexParserConfig is the configuration of a regex parser operator.

func NewRegexParserConfig

func NewRegexParserConfig(operatorID string) *RegexParserConfig

func (RegexParserConfig) Build

Build will build a regex parser operator.

type SeverityParserConfig

type SeverityParserConfig struct {
	helper.TransformerConfig    `yaml:",inline"`
	helper.SeverityParserConfig `yaml:",omitempty,inline"`
}

SeverityParserConfig is the configuration of a severity parser operator.

func NewSeverityParserConfig

func NewSeverityParserConfig(operatorID string) *SeverityParserConfig

func (SeverityParserConfig) Build

Build will build a time parser operator.

type SeverityParserOperator

type SeverityParserOperator struct {
	helper.TransformerOperator
	helper.SeverityParser
}

SeverityParserOperator is an operator that parses time from a field to an entry.

func (*SeverityParserOperator) Process

func (p *SeverityParserOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will parse time from an entry.

type SyslogParser

type SyslogParser struct {
	helper.ParserOperator
	// contains filtered or unexported fields
}

SyslogParser is an operator that parses syslog.

func (*SyslogParser) Process

func (s *SyslogParser) Process(ctx context.Context, entry *entry.Entry) error

Process will parse an entry field as syslog.

type SyslogParserConfig

type SyslogParserConfig struct {
	helper.ParserConfig `yaml:",inline"`

	Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
}

SyslogParserConfig is the configuration of a syslog parser operator.

func NewSyslogParserConfig

func NewSyslogParserConfig(operatorID string) *SyslogParserConfig

func (SyslogParserConfig) Build

Build will build a JSON parser operator.

type TimeParserConfig

type TimeParserConfig struct {
	helper.TransformerConfig `yaml:",inline"`
	helper.TimeParser        `yaml:",omitempty,inline"`
}

TimeParserConfig is the configuration of a time parser operator.

func NewTimeParserConfig

func NewTimeParserConfig(operatorID string) *TimeParserConfig

func (TimeParserConfig) Build

Build will build a time parser operator.

type TimeParserOperator

type TimeParserOperator struct {
	helper.TransformerOperator
	helper.TimeParser
}

TimeParserOperator is an operator that parses time from a field to an entry.

func (*TimeParserOperator) CanOutput

func (t *TimeParserOperator) CanOutput() bool

CanOutput will always return true for a parser operator.

func (*TimeParserOperator) Process

func (t *TimeParserOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will parse time from an entry.

Directories

Path Synopsis
json module
regex module
severity module
syslog module
time module

Jump to

Keyboard shortcuts

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