Skip to content

Commit

Permalink
Rename NewScheduler -> New
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed Nov 12, 2015
1 parent 7adfabe commit 4d99ee7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contrib/mesos/pkg/scheduler/components/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/mesos/pkg/scheduler/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 4d99ee7

Please sign in to comment.