Documentation ¶
Index ¶
- type IRule
- type Rule
- func (r *Rule) ApplyDispatchers(ctx context.Context, alert alerts.Alert) error
- func (r *Rule) ApplyEnrichments(ctx context.Context, record shared.Record) error
- func (r *Rule) ApplyFormatters(ctx context.Context, record shared.Record) error
- func (r *Rule) ApplyMatchers(ctx context.Context, record shared.Record) bool
- func (r *Rule) ApplyTuningRules(ctx context.Context, record shared.Record) error
- func (r *Rule) Checksum() string
- func (r *Rule) Disable()
- func (r *Rule) Evaluate(ctx context.Context, record shared.Record) bool
- func (r *Rule) Name() string
- type RuleError
- type RuleOption
- func Description(description string) RuleOption
- func Disabled(disabled bool) RuleOption
- func Dispatchers(dispatchers []dispatchers.IDispatcher) RuleOption
- func Enrichments(enrichments []enrichments.IEnrichment) RuleOption
- func Formatters(formatters []formatters.IFormatter) RuleOption
- func Inputs(inputs []inputs.IInput) RuleOption
- func Matchers(matchers []matchers.IMatcher) RuleOption
- func MergeByKeys(mergeByKeys []string) RuleOption
- func MergeWindowMins(mergeWindowMins int) RuleOption
- func Name(name string) RuleOption
- func ReqSubkeys(reqSubkeys []string) RuleOption
- func Severity(severity int) RuleOption
- func TuningRules(tuningRules []tuning_rules.ITuningRule) RuleOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
func NewRule ¶
func NewRule(name string, setters ...RuleOption) Rule
func (*Rule) ApplyDispatchers ¶
ApplyDispatchers applies all dispatchers to the event.
func (*Rule) ApplyEnrichments ¶
ApplyEnrichments applies all enrichment functions to the event.
func (*Rule) ApplyFormatters ¶
ApplyFormatters applies all formatters to the event.
func (*Rule) ApplyMatchers ¶
ApplyMatchers applies all matchers to the event.
func (*Rule) ApplyTuningRules ¶
ApplyTuningRules applies all tuning rules to the event.
type RuleOption ¶
type RuleOption func(*Rule)
func Description ¶
func Description(description string) RuleOption
func Disabled ¶
func Disabled(disabled bool) RuleOption
func Dispatchers ¶
func Dispatchers(dispatchers []dispatchers.IDispatcher) RuleOption
func Enrichments ¶
func Enrichments(enrichments []enrichments.IEnrichment) RuleOption
func Formatters ¶
func Formatters(formatters []formatters.IFormatter) RuleOption
func Inputs ¶
func Inputs(inputs []inputs.IInput) RuleOption
func Matchers ¶
func Matchers(matchers []matchers.IMatcher) RuleOption
func MergeByKeys ¶
func MergeByKeys(mergeByKeys []string) RuleOption
func MergeWindowMins ¶
func MergeWindowMins(mergeWindowMins int) RuleOption
func Name ¶
func Name(name string) RuleOption
func ReqSubkeys ¶
func ReqSubkeys(reqSubkeys []string) RuleOption
func Severity ¶
func Severity(severity int) RuleOption
func TuningRules ¶
func TuningRules(tuningRules []tuning_rules.ITuningRule) RuleOption
Click to show internal directories.
Click to hide internal directories.