scheduler

package
v0.0.0-...-4d19ac6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SuperClusterResourceRegister for super clusters
	SuperClusterResourceRegister plugin.ResourceRegister
	// VirtualClusterResourceRegister for virtual clusters
	VirtualClusterResourceRegister plugin.ResourceRegister
)

ResourceRegisters for easier handle of clusters

View Source
var (
	// DirtyVirtualClusters for virtual.
	DirtyVirtualClusters sync.Map
	// DirtySuperClusters for super clusters.
	DirtySuperClusters sync.Map
)

The dirty sets are used in bootstrap and in handling cluster offline. If a cluster was in dirty set and becomes online again, the cluster state needs to be synchronized with the scheduler cache first during which the scheduler will not serve any scheduling request from that cluster.

Functions

This section is empty.

Types

type Scheduler

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

Scheduler object

func New

func New(
	config *schedulerconfig.SchedulerConfiguration,
	vcClient vcclient.Interface,
	vcInformer vcinformers.VirtualClusterInformer,
	superClient superclient.Interface,
	superInformer superinformers.ClusterInformer,
	metaClusterClient clientset.Interface,
	metaInformers informers.SharedInformerFactory,
	stopCh <-chan struct{},
	recorder record.EventRecorder,
) (*Scheduler, error)

New creates new Scheduler

func (*Scheduler) Bootstrap

func (s *Scheduler) Bootstrap() error

Bootstrap initializes the scheduler cache.

func (*Scheduler) Dump

func (s *Scheduler) Dump()

Dump scheduler cache.

func (*Scheduler) Run

func (s *Scheduler) Run(stopChan <-chan struct{})

Run start Scheduler

Jump to

Keyboard shortcuts

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