event_to_tag

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ToTag

type ToTag struct {
	Values     []string `mapstructure:"values,omitempty" json:"values,omitempty"`
	ValueNames []string `mapstructure:"value-names,omitempty" json:"value-names,omitempty"`
	Keep       bool     `mapstructure:"keep,omitempty" json:"keep,omitempty"`
	Debug      bool     `mapstructure:"debug,omitempty" json:"debug,omitempty"`
	// contains filtered or unexported fields
}

ToTag moves ALL values matching any of the regex in .Values to the EventMsg.Tags map. if .Keep is true, the matching values are not deleted from EventMsg.Tags

func (*ToTag) Apply

func (t *ToTag) Apply(es ...*formatters.EventMsg) []*formatters.EventMsg

func (*ToTag) Init

func (t *ToTag) Init(cfg interface{}, opts ...formatters.Option) error

func (*ToTag) WithLogger added in v0.9.1

func (t *ToTag) WithLogger(l *log.Logger)

func (*ToTag) WithTargets added in v0.12.2

func (t *ToTag) WithTargets(tcs map[string]*types.TargetConfig)

Jump to

Keyboard shortcuts

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