Documentation ¶
Overview ¶
Package annotation contains event handler and predicate builders for annotations. There are two types of builders:
- Falsy builders result in objects being queued if the annotation is not present OR contains a falsy value. - Truthy builders are the falsy complement: objects will be enqueued if the annotation is present AND contains a truthy value.
Truthiness/falsiness is determined by Go's strconv.ParseBool().
Index ¶
- func NewFalsyEventHandler(key string, opts Options) (handler.EventHandler, error)
- func NewFalsyPredicate(key string, opts Options) (predicate.Predicate, error)
- func NewTruthyEventHandler(key string, opts Options) (handler.EventHandler, error)
- func NewTruthyPredicate(key string, opts Options) (predicate.Predicate, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFalsyEventHandler ¶
func NewFalsyEventHandler(key string, opts Options) (handler.EventHandler, error)
NewFalsyEventHandler returns an event handler that enqueues objects that do not have annotation with key string key or whose value is falsy.
func NewFalsyPredicate ¶
NewFalsyPredicate returns a predicate that passes objects that do not have annotation with key string key or whose value is falsy.
func NewTruthyEventHandler ¶
func NewTruthyEventHandler(key string, opts Options) (handler.EventHandler, error)
NewTruthyEventHandler returns an event handler that enqueues objects that do have annotation with key string key and whose value is truthy.