controller

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package controller list and keep watching a specific Kubernetes resource kind (ie. "apps/v1 Deployment", "v1 Namespace", etc) and notifies a recorder whenever a change happens (an object changed, was created, or deleted). This is a generic implementation: the resource kind to watch is provided at runtime. We should start several such controllers to watch for distinct resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a generic kubernetes controller

func New added in v0.4.0

func New(client cache.ListerWatcher,
	notifier event.Notifier,
	log logger,
	name string,
	filter string,
	resync time.Duration,
	excluded []string,
) *Controller

New return a kubernetes controller using the provided client

func (*Controller) Start added in v0.4.0

func (c *Controller) Start()

Start launchs the controller in the background

func (*Controller) Stop added in v0.4.0

func (c *Controller) Stop()

Stop halts the controller

type Factory added in v0.4.0

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

Factory generate controllers

func NewFactory added in v0.5.0

func NewFactory(logger logger, filter string, resync int, excluded []string) *Factory

NewFactory create a controller factory

func (*Factory) NewController added in v0.4.0

func (f *Factory) NewController(client cache.ListerWatcher, notifier event.Notifier, name string) Interface

NewController create a controller.Controller

type Interface added in v0.4.0

type Interface interface {
	Start()
	Stop()
}

Interface describe a standard kubernetes controller

Jump to

Keyboard shortcuts

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