Merge pull request #118442 from SataQiu/clean-scheduler-20230604

Scheduler: fix code style issues for pkg/scheduler
This commit is contained in:
Kubernetes Prow Robot 2023-06-05 04:13:25 -07:00 committed by GitHub
commit 72a3990728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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
} }

View File

@ -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 {

View File

@ -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()}
} }