Documentation
¶
Index ¶
- type Trigger
- func (p *Trigger) Apply(es ...*formatters.EventMsg) []*formatters.EventMsg
- func (p *Trigger) Init(cfg interface{}, opts ...formatters.Option) error
- func (p *Trigger) String() string
- func (p *Trigger) WithActions(acts map[string]map[string]interface{})
- func (p *Trigger) WithLogger(l *log.Logger)
- func (p *Trigger) WithTargets(tcs map[string]*types.TargetConfig)
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) WithActions ¶
func (*Trigger) WithLogger ¶
func (*Trigger) WithTargets ¶
func (p *Trigger) WithTargets(tcs map[string]*types.TargetConfig)
Click to show internal directories.
Click to hide internal directories.