mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
Merge pull request #118442 from SataQiu/clean-scheduler-20230604
Scheduler: fix code style issues for pkg/scheduler
This commit is contained in:
commit
72a3990728
@ -271,7 +271,7 @@ func ValidateVolumeBindingArgs(path *field.Path, args *config.VolumeBindingArgs)
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateVolumeBindingArgs validates that VolumeBindingArgs with scheduler features.
|
// ValidateVolumeBindingArgsWithOptions validates that VolumeBindingArgs and VolumeBindingArgsValidationOptions with scheduler features.
|
||||||
func ValidateVolumeBindingArgsWithOptions(path *field.Path, args *config.VolumeBindingArgs, opts VolumeBindingArgsValidationOptions) error {
|
func ValidateVolumeBindingArgsWithOptions(path *field.Path, args *config.VolumeBindingArgs, opts VolumeBindingArgsValidationOptions) error {
|
||||||
var allErrs field.ErrorList
|
var allErrs field.ErrorList
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ type AssumeCache interface {
|
|||||||
// Get the object by name
|
// Get the object by name
|
||||||
Get(objName string) (interface{}, error)
|
Get(objName string) (interface{}, error)
|
||||||
|
|
||||||
// Get the API object by name
|
// GetAPIObj gets the API object by name
|
||||||
GetAPIObj(objName string) (interface{}, error)
|
GetAPIObj(objName string) (interface{}, error)
|
||||||
|
|
||||||
// List all the objects in the cache
|
// List all the objects in the cache
|
||||||
|
@ -602,7 +602,7 @@ func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, plugin
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnqueuePlugins returns the registered enqueue plugins.
|
// PreEnqueuePlugins returns the registered preEnqueue plugins.
|
||||||
func (f *frameworkImpl) PreEnqueuePlugins() []framework.PreEnqueuePlugin {
|
func (f *frameworkImpl) PreEnqueuePlugins() []framework.PreEnqueuePlugin {
|
||||||
return f.preEnqueuePlugins
|
return f.preEnqueuePlugins
|
||||||
}
|
}
|
||||||
|
@ -103,9 +103,9 @@ type Scheduler struct {
|
|||||||
logger klog.Logger
|
logger klog.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Scheduler) applyDefaultHandlers() {
|
func (sched *Scheduler) applyDefaultHandlers() {
|
||||||
s.SchedulePod = s.schedulePod
|
sched.SchedulePod = sched.schedulePod
|
||||||
s.FailureHandler = s.handleSchedulingFailure
|
sched.FailureHandler = sched.handleSchedulingFailure
|
||||||
}
|
}
|
||||||
|
|
||||||
type schedulerOptions struct {
|
type schedulerOptions struct {
|
||||||
|
@ -930,12 +930,12 @@ type PodSchedulingWrapper struct {
|
|||||||
resourcev1alpha2.PodSchedulingContext
|
resourcev1alpha2.PodSchedulingContext
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakePodSchedulingContext creates a PodSchedulingContext wrapper.
|
// MakePodSchedulingContexts creates a PodSchedulingContext wrapper.
|
||||||
func MakePodSchedulingContexts() *PodSchedulingWrapper {
|
func MakePodSchedulingContexts() *PodSchedulingWrapper {
|
||||||
return &PodSchedulingWrapper{resourcev1alpha2.PodSchedulingContext{}}
|
return &PodSchedulingWrapper{resourcev1alpha2.PodSchedulingContext{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FromPodSchedulingContext creates a PodSchedulingContext wrapper from some existing object.
|
// FromPodSchedulingContexts creates a PodSchedulingContext wrapper from an existing object.
|
||||||
func FromPodSchedulingContexts(other *resourcev1alpha2.PodSchedulingContext) *PodSchedulingWrapper {
|
func FromPodSchedulingContexts(other *resourcev1alpha2.PodSchedulingContext) *PodSchedulingWrapper {
|
||||||
return &PodSchedulingWrapper{*other.DeepCopy()}
|
return &PodSchedulingWrapper{*other.DeepCopy()}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user