mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +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 {
|
||||
var allErrs field.ErrorList
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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()}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user