Unroll PreemptHandle to Handle
This commit is contained in:
@@ -552,6 +552,10 @@ type Framework interface {
|
||||
// passed to the plugin factories at the time of plugin initialization. Plugins
|
||||
// must store and use this handle to call framework functions.
|
||||
type Handle interface {
|
||||
// PodNominator abstracts operations to maintain nominated Pods.
|
||||
PodNominator
|
||||
// PluginsRunner abstracts operations to run some plugins.
|
||||
PluginsRunner
|
||||
// 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
|
||||
@@ -581,8 +585,8 @@ type Handle interface {
|
||||
// RunFilterPluginsWithNominatedPods runs the set of configured filter plugins for nominated pod on the given node.
|
||||
RunFilterPluginsWithNominatedPods(ctx context.Context, state *CycleState, pod *v1.Pod, info *NodeInfo) *Status
|
||||
|
||||
// TODO: unroll the wrapped interfaces to Handle.
|
||||
PreemptHandle() PreemptHandle
|
||||
// Extenders returns registered scheduler extenders.
|
||||
Extenders() []Extender
|
||||
}
|
||||
|
||||
// PostFilterResult wraps needed info for scheduler framework to act upon PostFilter phase.
|
||||
@@ -590,16 +594,6 @@ type PostFilterResult struct {
|
||||
NominatedNodeName string
|
||||
}
|
||||
|
||||
// PreemptHandle incorporates all needed logic to run preemption logic.
|
||||
type PreemptHandle interface {
|
||||
// PodNominator abstracts operations to maintain nominated Pods.
|
||||
PodNominator
|
||||
// PluginsRunner abstracts operations to run some plugins.
|
||||
PluginsRunner
|
||||
// Extenders returns registered scheduler extenders.
|
||||
Extenders() []Extender
|
||||
}
|
||||
|
||||
// PodNominator abstracts operations to maintain nominated Pods.
|
||||
type PodNominator interface {
|
||||
// AddNominatedPod adds the given pod to the nominated pod map or
|
||||
|
Reference in New Issue
Block a user