filter

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PassFilter added in v0.19.0

func PassFilter(ctx context.Context, attrs map[string]string, event *event.Event) bool

PassFilter checks given event against attributes available in the attrs map to determine if the event should pass or not.

Types

type Processor

type Processor struct {
	processors.BaseProcessor

	// Targets is the targets from config.
	Targets config.ReadonlyTargets
}

Processor is the processor to filter events based on trigger filters.

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, event *event.Event) error

Process passes the event to the next processor if the event passes the filter. Otherwise it simply returns.

Jump to

Keyboard shortcuts

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