manager

package
v1.12.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResourceEventHandler

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

CommonResourceEventHandler can be used by NodeUpgradeJob Manager

func NewCommonResourceEventHandler

func NewCommonResourceEventHandler(events chan watch.Event) *CommonResourceEventHandler

NewCommonResourceEventHandler create CommonResourceEventHandler used by NodeUpgradeJob Manager

func (*CommonResourceEventHandler) OnAdd

func (c *CommonResourceEventHandler) OnAdd(obj interface{})

OnAdd handle Add event

func (*CommonResourceEventHandler) OnDelete

func (c *CommonResourceEventHandler) OnDelete(obj interface{})

OnDelete handle Delete event

func (*CommonResourceEventHandler) OnUpdate

func (c *CommonResourceEventHandler) OnUpdate(oldObj, newObj interface{})

OnUpdate handle Update event

type Manager

type Manager interface {
	Events() chan watch.Event
}

Manager define the interface of a Manager, NodeUpgradeJob Manager implement it

type NodeUpgradeJobManager

type NodeUpgradeJobManager struct {

	// UpgradeMap, key is NodeUpgradeJob.Name, value is *v1alpha1.NodeUpgradeJob{}
	UpgradeMap sync.Map
	// contains filtered or unexported fields
}

NodeUpgradeJobManager is a manager watch NodeUpgradeJob change event

func NewNodeUpgradeJobManager

func NewNodeUpgradeJobManager(si cache.SharedIndexInformer) (*NodeUpgradeJobManager, error)

NewNodeUpgradeJobManager create NodeUpgradeJobManager from config

func (*NodeUpgradeJobManager) Events

func (dmm *NodeUpgradeJobManager) Events() chan watch.Event

Events return a channel, can receive all NodeUpgradeJob event

Jump to

Keyboard shortcuts

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