controller

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 1 Imported by: 25

Documentation

Overview

Package controller provides helper methods for external controllers for Custom Task types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterRunRef

func FilterRunRef(apiVersion, kind string) func(interface{}) bool

FilterRunRef returns a filter that can be passed to a Run Informer, which filters out Runs for apiVersion and kinds that a controller doesn't care about.

For example, a controller impl that wants to be notified of updates to Runs which reference a Task with apiVersion "example.dev/v0" and kind "Example":

runinformer.Get(ctx).Informer().AddEventHandler(cache.FilteringResourceEventHandler{
  FilterFunc: FilterRunRef("example.dev/v0", "Example"),
  Handler:    controller.HandleAll(impl.Enqueue),
})

Types

This section is empty.

Jump to

Keyboard shortcuts

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