Skip to content

Commit

Permalink
scheduler: fix code style issues for pkg/scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
SataQiu committed Jun 5, 2023
1 parent bb87860 commit 410b602
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
var allErrs field.ErrorList

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type AssumeCache interface {
// Get the object by name
Get(objName string) (interface{}, error)

// Get the API object by name
// GetAPIObj gets the API object by name
GetAPIObj(objName string) (interface{}, error)

// List all the objects in the cache
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/framework/runtime/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, plugin
return nil
}

// EnqueuePlugins returns the registered enqueue plugins.
// PreEnqueuePlugins returns the registered preEnqueue plugins.
func (f *frameworkImpl) PreEnqueuePlugins() []framework.PreEnqueuePlugin {
return f.preEnqueuePlugins
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ type Scheduler struct {
logger klog.Logger
}

func (s *Scheduler) applyDefaultHandlers() {
s.SchedulePod = s.schedulePod
s.FailureHandler = s.handleSchedulingFailure
func (sched *Scheduler) applyDefaultHandlers() {
sched.SchedulePod = sched.schedulePod
sched.FailureHandler = sched.handleSchedulingFailure
}

type schedulerOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/testing/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,12 +930,12 @@ type PodSchedulingWrapper struct {
resourcev1alpha2.PodSchedulingContext
}

// MakePodSchedulingContext creates a PodSchedulingContext wrapper.
// MakePodSchedulingContexts creates a PodSchedulingContext wrapper.
func MakePodSchedulingContexts() *PodSchedulingWrapper {
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 {
return &PodSchedulingWrapper{*other.DeepCopy()}
}
Expand Down

0 comments on commit 410b602

Please sign in to comment.