annotation

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

func NewFalsyPredicate(key string, opts Options) (predicate.Predicate, error)

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.

func NewTruthyPredicate

func NewTruthyPredicate(key string, opts Options) (predicate.Predicate, error)

NewTruthyPredicate returns a predicate that passes objects that do have annotation with key string key and whose value is truthy.

Types

type Options

type Options struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

Options configures a filter.

Source Files

Jump to

Keyboard shortcuts

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