manager

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 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{}, isInInitialList bool)

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 TaskCache

type TaskCache struct {

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

TaskCache is a manager watch CRD change event

func NewTaskCache

func NewTaskCache(si cache.SharedIndexInformer) (*TaskCache, error)

NewTaskCache create TaskCache from config

func (*TaskCache) Events

func (dmm *TaskCache) 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