handle

package
v0.0.0-...-e54718b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodFrameworkHandle

type PodFrameworkHandle interface {
	// SwitchType indicates the cluster binary code corresponding to the current workflow.
	// It will be used to resolve BE/GT qos.
	SwitchType() framework.SwitchType
	SubCluster() string
	SchedulerName() string

	// SnapshotSharedLister returns listers from the latest NodeInfo Snapshot. The snapshot
	// is taken at the beginning of a scheduling cycle and remains unchanged until
	// a pod finishes "Permit" point. There is no guarantee that the information
	// remains unchanged in the binding phase of scheduling, so plugins in the binding
	// cycle (pre-bind/bind/post-bind/un-reserve plugin) should not use it,
	// otherwise a concurrent read/write error might occur, they should use scheduler
	// cache instead.
	SnapshotSharedLister() framework.SharedLister

	// ClientSet returns a kubernetes clientSet.
	ClientSet() clientset.Interface
	SharedInformerFactory() informers.SharedInformerFactory
	CRDSharedInformerFactory() crdinformers.SharedInformerFactory
	GetFrameworkForPod(*v1.Pod) (framework.SchedulerFramework, error)

	FindStore(storeName commonstore.StoreName) commonstore.Store

	// Note: The function's underlying access is Snapshot, Snapshot operations are lock-free.
	SetPotentialVictims(node string, potentialVictims []string)
	// Note: The function's underlying access is Snapshot, Snapshot operations are lock-free.
	GetPotentialVictims(node string) []string

	GetPreemptionFrameworkForPod(*v1.Pod) framework.SchedulerPreemptionFramework
	GetPreemptionPolicy(deployName string) string
	CachePreemptionPolicy(deployName string, policyName string)
	CleanupPreemptionPolicyForPodOwner()
}

PodFrameworkHandle provides data and some tools that plugins can use in Scheduler. It is passed to the plugin factories at the time of plugin initialization. Plugins must store and use this handle to call framework functions.

type UnitFrameworkHandle

type UnitFrameworkHandle interface {
	SwitchType() framework.SwitchType
	SubCluster() string
	SchedulerName() string
	EventRecorder() events.EventRecorder

	GetUnitStatus(string) unitstatus.UnitStatus
	IsAssumedPod(pod *v1.Pod) (bool, error)
	IsCachedPod(pod *v1.Pod) (bool, error)
	GetNodeInfo(nodeName string) framework.NodeInfo

	FindStore(commonstore.StoreName) commonstore.Store

	GetMaxWaitingDeletionDuration() time.Duration
}

Jump to

Keyboard shortcuts

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