mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Rename NewScheduler -> New
This commit is contained in:
parent
7adfabecda
commit
4d99ee7e54
@ -53,7 +53,7 @@ type sched struct {
|
||||
taskRegistry podtask.Registry
|
||||
}
|
||||
|
||||
func NewScheduler(c *config.Config, fw framework.Framework, ps podschedulers.PodScheduler,
|
||||
func New(c *config.Config, fw framework.Framework, ps podschedulers.PodScheduler,
|
||||
client *client.Client, recorder record.EventRecorder, terminate <-chan struct{}, mux *http.ServeMux, lw *cache.ListWatch) scheduler.Scheduler {
|
||||
|
||||
core := &sched{
|
||||
|
@ -487,7 +487,7 @@ func newLifecycleTest(t *testing.T) lifecycleTest {
|
||||
|
||||
// create scheduler
|
||||
eventObs := NewEventObserver()
|
||||
scheduler := components.NewScheduler(&c, fw, fcfs, client, eventObs, schedulerProc.Terminal(), http.DefaultServeMux, &podsListWatch.ListWatch)
|
||||
scheduler := components.New(&c, fw, fcfs, client, eventObs, schedulerProc.Terminal(), http.DefaultServeMux, &podsListWatch.ListWatch)
|
||||
assert.NotNil(scheduler)
|
||||
|
||||
// create mock mesos scheduler driver
|
||||
|
@ -766,7 +766,7 @@ func (s *SchedulerServer) bootstrap(hks hyperkube.Interface, sc *schedcfg.Config
|
||||
|
||||
// create scheduler loop
|
||||
lw := cache.NewListWatchFromClient(client, "pods", api.NamespaceAll, fields.Everything())
|
||||
sched := components.NewScheduler(sc, framework, fcfs, client, recorder, schedulerProcess.Terminal(), s.mux, lw)
|
||||
sched := components.New(sc, framework, fcfs, client, recorder, schedulerProcess.Terminal(), s.mux, lw)
|
||||
|
||||
runtime.On(framework.Registration(), func() { sched.Run(schedulerProcess.Terminal()) })
|
||||
runtime.On(framework.Registration(), s.newServiceWriter(schedulerProcess.Terminal()))
|
||||
|
Loading…
Reference in New Issue
Block a user