syslog

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const RFC3164 = "rfc3164"
View Source
const RFC5424 = "rfc5424"

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Name   string
	Config *SyslogParserConfig
	Input  *entry.Entry
	Expect *entry.Entry
}

func CreateCases

func CreateCases(basicConfig func() *SyslogParserConfig) ([]Case, error)

type SyslogBaseConfig

type SyslogBaseConfig struct {
	Protocol string `mapstructure:"protocol,omitempty" json:"protocol,omitempty" yaml:"protocol,omitempty"`
	Location string `mapstructure:"location,omitempty" json:"location,omitempty" yaml:"location,omitempty"`
}

SyslogBaseConfig is the detailed configuration of a syslog parser.

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 `mapstructure:",squash" yaml:",inline"`
	SyslogBaseConfig    `mapstructure:",squash" yaml:",inline"`
}

SyslogParserConfig is the configuration of a syslog parser operator.

func NewSyslogParserConfig

func NewSyslogParserConfig(operatorID string) *SyslogParserConfig

NewSyslogParserConfig creates a new syslog parser config with default values

func (SyslogParserConfig) Build

Build will build a JSON parser operator.

Jump to

Keyboard shortcuts

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