controller

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRemoteControllerReference added in v0.10.0

func AddRemoteControllerReference(child metav1.Object, parent metav1.Object)

func HandleAddUpdateWith added in v0.9.0

func HandleAddUpdateWith(f func(obj interface{})) cache.ResourceEventHandlerFuncs

func HandleAllWith added in v0.9.0

func HandleAllWith(f func(obj interface{})) cache.ResourceEventHandlerFuncs

func IsOptimisticLockError added in v0.12.0

func IsOptimisticLockError(err error) bool

func ParentControlsChild added in v0.10.0

func ParentControlsChild(child metav1.Object, parent metav1.Object) bool

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(name string, reconciler Reconciler, informersSynced ...cache.InformerSynced) *Controller

func (*Controller) EnqueueController added in v0.9.0

func (c *Controller) EnqueueController(ownerKind string, getOwner GetOwner) func(obj interface{})

func (*Controller) EnqueueKey added in v0.9.0

func (c *Controller) EnqueueKey(key interface{})

func (*Controller) EnqueueObject added in v0.9.0

func (c *Controller) EnqueueObject(obj interface{})

func (*Controller) EnqueueRemoteController added in v0.9.0

func (c *Controller) EnqueueRemoteController(ownerKind string, getOwner GetOwner) func(obj interface{})

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type GetOwner added in v0.9.0

type GetOwner func(namespace string, name string) (metav1.Object, error)

type Reconciler

type Reconciler interface {
	Handle(key interface{}) (requeueAfter *time.Duration, err error)
}

Jump to

Keyboard shortcuts

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