syslog

package
v0.59.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig added in v0.53.0

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

BaseConfig is the detailed configuration of a syslog parser.

type Case

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

func CreateCases

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

type Config added in v0.53.0

type Config struct {
	helper.ParserConfig `mapstructure:",squash" yaml:",inline"`
	BaseConfig          `mapstructure:",squash" yaml:",inline"`
}

Config is the configuration of a syslog parser operator.

func NewConfig added in v0.53.0

func NewConfig() *Config

NewConfig creates a new syslog parser config with default values

func NewConfigWithID added in v0.59.0

func NewConfigWithID(operatorID string) *Config

NewConfigWithID creates a new syslog parser config with default values

func (Config) Build added in v0.53.0

func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error)

Build will build a JSON parser operator.

type Parser added in v0.53.0

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

Parser is an operator that parses syslog.

func (*Parser) Process added in v0.53.0

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

Process will parse an entry field as syslog.

Jump to

Keyboard shortcuts

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