dispatcher

package
v0.0.0-...-6111fc0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DispatcherTag = "dispatcher"
)

Variables

This section is empty.

Functions

func AddAllEventHandlers

func AddAllEventHandlers(
	dispatcher *Dispatcher,
	podInformer coreinformers.PodInformer,
	schedulerInformer schedulinginformer.SchedulerInformer,
	nodeInformer coreinformers.NodeInformer,
	nmNodeInformer nodeinformer.NMNodeInformer,
	podGroupInformer schedulinginformer.PodGroupInformer,
)

Types

type Dispatcher

type Dispatcher struct {
	StopEverything <-chan struct{}

	// TODO: move to policy manager
	// UnitManager contains pending pods belonging to scheduling units.
	UnitInfos queue.UnitInfos

	// FIFOPendingPodsQueue is used to store pods that will be dispatched
	// in a FIFO manner
	// TODO: figure out if we really need this queue
	// TODO: move to policy manager if necessary
	FIFOPendingPodsQueue queue.PendingQueue

	// SortedPodsQueue stores pending pods that have already be sorted
	// based on their configured ordering policy. When dispatching pods to
	// scheduler, dispatcher will pop pods from this queue.
	SortedPodsQueue queue.SortedQueue

	DispatchInfo store.DispatchInfo

	OwnerInfos store.OwnerInfo

	SchedulerLister     schedulinglister.SchedulerLister
	NodeLister          listerv1.NodeLister
	NMNodeLister        nodelister.NMNodeLister
	PodGroupLister      schedulinglister.PodGroupLister
	PriorityClassLister schedulingv1.PriorityClassLister

	// SchedulerName here is the higher level scheduler name, which is used to select pods
	// that godel schedulers should be responsible for and filter out irrelevant pods.
	SchedulerName string
	// contains filtered or unexported fields
}

func New

func New(
	stopCh <-chan struct{},
	client kubernetes.Interface,
	crdClient crdclient.Interface,
	podInformer coreinformers.PodInformer,
	nodeInformer coreinformers.NodeInformer,
	schedulerInformer schedulinginformer.SchedulerInformer,
	nmNodeInformer nodeinformer.NMNodeInformer,
	podGroupInformer schedulinginformer.PodGroupInformer,
	priorityClassInformer schedinformers.PriorityClassInformer,
	schedulerName string,
	recorder events.EventRecorder,
) *Dispatcher

func (*Dispatcher) Run

func (d *Dispatcher) Run(ctx context.Context)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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