controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonController

type CommonController struct {
	Conf      *config.KdnConfig
	Queue     workqueue.RateLimitingInterface
	Informer  cache.SharedIndexInformer
	Name      string
	ListWatch cache.ListerWatcher
	ObjType   runtime.Object
	StopCh    chan struct{}
	Notifiers notifiers.Notifier
	// contains filtered or unexported fields
}

CommonController groups fields and funcs that most controllers would like to implement (controllers in the Kubernetes' client-go sense).

func (*CommonController) Start

func (c *CommonController) Start(wg *sync.WaitGroup)

Start initialize and launch a controller goroutine.

func (*CommonController) Stop

func (c *CommonController) Stop()

Stop ends a controller and notify the controllers WaitGroup

type Controller

type Controller interface {
	Start(wg *sync.WaitGroup)
	Stop()
	Init(c *config.KdnConfig, n notifiers.Notifier) Controller
}

Controller are started in a persistent goroutine at program launch, and are responsible for watching resources and calling notifiers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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