eventfilter

package
v0.1.4-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func False

func False(model.Event) bool

func True

func True(model.Event) bool

Types

type Predicate

type Predicate func(model.Event) bool

func And

func And(predicates ...Predicate) Predicate

func EqKind

func EqKind(kind model.EventKind) Predicate

func EqResourceName

func EqResourceName(name string) Predicate

func EqType

func EqType(resourceType model.ResourceType) Predicate

func MatchAnyKind

func MatchAnyKind(kinds ...model.EventKind) Predicate

func MatchAnyType

func MatchAnyType(resourceTypes ...model.ResourceType) Predicate

func MatchResourceName

func MatchResourceName(names ...string) Predicate

func Not

func Not(predicate Predicate) Predicate

func Or

func Or(predicates ...Predicate) Predicate

func (Predicate) Filter

func (predicate Predicate) Filter(events []model.Event) []model.Event

func (Predicate) MatchAll

func (predicate Predicate) MatchAll(events []model.Event) bool

func (Predicate) Pipe

func (predicate Predicate) Pipe(n int, in <-chan model.Event) <-chan model.Event

Spawns n (if n>0, else runtime.NumCPU()) filtering workers

type Whitelist

type Whitelist struct {
	UserEvents  []string
	AdminEvents []string
}

func (Whitelist) AdminEventsFilter

func (whitelist Whitelist) AdminEventsFilter() Predicate

func (Whitelist) UserEventsFilter

func (whitelist Whitelist) UserEventsFilter() Predicate

Jump to

Keyboard shortcuts

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