selectivedeployment

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Start function is entry point of the controller

Types

type HandlerInterface

type HandlerInterface interface {
	Init() error
	ObjectCreated(obj interface{})
	ObjectUpdated(obj interface{}, delta string)
	ObjectDeleted(obj interface{}, delta string)
	ConfigureControllers()
	CheckControllerStatus(old, new interface{}, eventType string) ([]selectivedeployment_v1.SelectiveDeployment, bool)
	GetSelectiveDeployments(node string) ([][]string, bool)
}

HandlerInterface interface contains the methods that are required

type SDHandler

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

SDHandler is a implementation of Handler

func (*SDHandler) CheckControllerStatus

func (t *SDHandler) CheckControllerStatus(oldObj interface{}, newObj interface{}, eventType string) ([]selectivedeployment_v1.SelectiveDeployment, bool)

CheckControllerStatus runs in case of any controller event

func (*SDHandler) ConfigureControllers

func (t *SDHandler) ConfigureControllers()

ConfigureControllers configures the controllers by selectivedeployments to match the desired state users supplied

func (*SDHandler) GetSelectiveDeployments

func (t *SDHandler) GetSelectiveDeployments(nodeName string) ([][]string, bool)

GetSelectiveDeployments generates selectivedeployment list from the owner references of controllers which contains the node that has an event (add/update/delete)

func (*SDHandler) Init

func (t *SDHandler) Init() error

Init handles any handler initialization

func (*SDHandler) ObjectCreated

func (t *SDHandler) ObjectCreated(obj interface{})

ObjectCreated is called when an object is created

func (*SDHandler) ObjectDeleted

func (t *SDHandler) ObjectDeleted(obj interface{}, delta string)

ObjectDeleted is called when an object is deleted

func (*SDHandler) ObjectUpdated

func (t *SDHandler) ObjectUpdated(obj interface{}, delta string)

ObjectUpdated is called when an object is updated

Jump to

Keyboard shortcuts

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