unitruntime

package
v0.0.0-...-e2cac0c Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SchedulerUnitFramework

type SchedulerUnitFramework interface {
	RunLocatingPlugins(ctx context.Context, unit framework.ScheduleUnit, unitCycleState *framework.CycleState, nodeGroup framework.NodeGroup) (framework.NodeGroup, *framework.Status)
	RunGroupingPlugin(ctx context.Context, unit framework.ScheduleUnit, unitCycleState *framework.CycleState, nodeGroup framework.NodeGroup) ([]framework.NodeGroup, *framework.Status)

	// Scheduling & Preempting in a specific NodeGroup instead of NodeGroups.
	Scheduling(ctx context.Context, unitInfo *core.SchedulingUnitInfo, nodeGroup framework.NodeGroup) *core.UnitSchedulingResult
	Preempting(ctx context.Context, unitInfo *core.SchedulingUnitInfo, nodeGroup framework.NodeGroup) *core.UnitPreemptionResult
}

func NewUnitFramework

func NewUnitFramework(
	handle handle.UnitFrameworkHandle,
	schedulerHooks core.SchedulerHooks,
	pluginRegistry framework.PluginMap,
	pluginOrder framework.PluginOrder,
	unit framework.ScheduleUnit,
) SchedulerUnitFramework

ATTENTION: Considering that UnitPlugin belongs to scheduling optimization behavior, all implemented plugins should be registered. The plugin should adaptively execute the corresponding logic based on the FeatureGate and the ScheduleUnit to be scheduled, without the need to adjust the plugin's registration or not through a configuration file.

type UnitFramework

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

func (*UnitFramework) Preempting

func (*UnitFramework) RunGroupingPlugin

func (f *UnitFramework) RunGroupingPlugin(ctx context.Context, unit framework.ScheduleUnit, unitCycleState *framework.CycleState, nodeGroup framework.NodeGroup) ([]framework.NodeGroup, *framework.Status)

func (*UnitFramework) RunLocatingPlugins

func (f *UnitFramework) RunLocatingPlugins(ctx context.Context, unit framework.ScheduleUnit, unitCycleState *framework.CycleState, nodeGroup framework.NodeGroup) (framework.NodeGroup, *framework.Status)

func (*UnitFramework) RunPreparePreferNodesPlugins

func (f *UnitFramework) RunPreparePreferNodesPlugins(ctx context.Context, unitCycleState, state *framework.CycleState, pod *v1.Pod) *framework.Status

func (*UnitFramework) Scheduling

Jump to

Keyboard shortcuts

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