controller

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, controller Controller)

func StartAllController

func StartAllController() error

Types

type BaseController

type BaseController struct {
	Informer    k8sinformer.SharedInformerFactory
	TaskManager *manager.TaskCache
	MessageChan chan util.TaskMessage
	KubeClient  kubernetes.Interface
	CrdClient   crdClientset.Interface
	// contains filtered or unexported fields
}

func (*BaseController) GetNodeStatus

func (bc *BaseController) GetNodeStatus(name string) ([]v1alpha1.TaskStatus, error)

func (*BaseController) Name

func (bc *BaseController) Name() string

func (*BaseController) ReportNodeStatus

func (bc *BaseController) ReportNodeStatus(taskID string, nodeID string, event fsm.Event) (api.State, error)

func (*BaseController) ReportTaskStatus

func (bc *BaseController) ReportTaskStatus(taskID string, event fsm.Event) (api.State, error)

func (*BaseController) StageCompleted

func (bc *BaseController) StageCompleted(taskID string, state api.State) bool

func (*BaseController) Start

func (bc *BaseController) Start() error

func (*BaseController) UpdateNodeStatus

func (bc *BaseController) UpdateNodeStatus(name string, status []v1alpha1.TaskStatus) error

func (*BaseController) ValidateNode

func (bc *BaseController) ValidateNode(taskMessage util.TaskMessage) []v1.Node

type Controller

type Controller interface {
	Name() string
	Start() error
	ReportNodeStatus(string, string, fsm.Event) (api.State, error)
	ReportTaskStatus(string, fsm.Event) (api.State, error)
	ValidateNode(util.TaskMessage) []v1.Node
	GetNodeStatus(string) ([]v1alpha1.TaskStatus, error)
	UpdateNodeStatus(string, []v1alpha1.TaskStatus) error
	StageCompleted(taskID string, state api.State) bool
}

func GetController

func GetController(name string) (Controller, error)

Jump to

Keyboard shortcuts

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