framework

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForeachController

func ForeachController(fn func(controller Controller))

ForeachController is helper function to operator all controllers.

func RegisterController

func RegisterController(ctrl Controller) error

RegisterController register controller to the controller manager.

Types

type Controller

type Controller interface {
	Name() string
	Initialize(opt *ControllerOption) error
	// Run run the controller
	Run(stopCh <-chan struct{})
}

Controller is the interface of all controllers.

type ControllerOption

type ControllerOption struct {
	KubeClient              kubernetes.Interface
	VolcanoClient           vcclientset.Interface
	SharedInformerFactory   informers.SharedInformerFactory
	VCSharedInformerFactory vcinformer.SharedInformerFactory
	SchedulerNames          []string
	WorkerNum               uint32
	MaxRequeueNum           int

	InheritOwnerAnnotations bool
	WorkerThreadsForPG      uint32
	WorkerThreadsForGC      uint32

	// Config holds the common attributes that can be passed to a Kubernetes client
	// and controllers registered by the users can use it.
	Config *rest.Config
}

ControllerOption is the main context object for the controllers.

Jump to

Keyboard shortcuts

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