event_trigger

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trigger

type Trigger struct {
	Condition      string                 `mapstructure:"condition,omitempty"`
	MinOccurrences int                    `mapstructure:"min-occurrences,omitempty"`
	MaxOccurrences int                    `mapstructure:"max-occurrences,omitempty"`
	Window         time.Duration          `mapstructure:"window,omitempty"`
	Actions        []string               `mapstructure:"actions,omitempty"`
	Vars           map[string]interface{} `mapstructure:"vars,omitempty"`
	VarsFile       string                 `mapstructure:"vars-file,omitempty"`
	Debug          bool                   `mapstructure:"debug,omitempty"`
	Async          bool                   `mapstructure:"async,omitempty"`
	// contains filtered or unexported fields
}

Trigger triggers an action when certain conditions are met

func (*Trigger) Apply

func (p *Trigger) Apply(es ...*formatters.EventMsg) []*formatters.EventMsg

func (*Trigger) Init

func (p *Trigger) Init(cfg interface{}, opts ...formatters.Option) error

func (*Trigger) String

func (p *Trigger) String() string

func (*Trigger) WithActions

func (p *Trigger) WithActions(acts map[string]map[string]interface{})

func (*Trigger) WithLogger

func (p *Trigger) WithLogger(l *log.Logger)

func (*Trigger) WithTargets

func (p *Trigger) WithTargets(tcs map[string]*types.TargetConfig)

Jump to

Keyboard shortcuts

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