controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Hooks  Hooks
	Client vckv1alpha1_client.Interface
}

Controller watches a resource and delegates create/update/delete events to a set of supplied callback functions.

func New

func New(hooks Hooks, client vckv1alpha1_client.Interface) *Controller

New returns a new Controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, namespace string) error

Run starts a resource controller

type Hooks

type Hooks interface {
	Add(obj interface{})
	Update(oldObj, newObj interface{})
	Delete(obj interface{})
}

Hooks is the callback interface that defines controller behavior.

Jump to

Keyboard shortcuts

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