From 85b64391dff237cf0f77705e088613547d91b088 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Sun, 25 Oct 2015 15:19:29 -0700 Subject: [PATCH] Rename schedulingPlugin -> schedulerPlugin --- contrib/mesos/pkg/scheduler/plugin.go | 10 +++++----- contrib/mesos/pkg/scheduler/plugin_test.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/mesos/pkg/scheduler/plugin.go b/contrib/mesos/pkg/scheduler/plugin.go index ce7d49cc8d4..eec7391b5fb 100644 --- a/contrib/mesos/pkg/scheduler/plugin.go +++ b/contrib/mesos/pkg/scheduler/plugin.go @@ -336,7 +336,7 @@ type PluginConfig struct { } func NewPlugin(c *PluginConfig) PluginInterface { - return &schedulingPlugin{ + return &schedulerPlugin{ config: c.Config, api: c.api, client: c.client, @@ -346,7 +346,7 @@ func NewPlugin(c *PluginConfig) PluginInterface { } } -type schedulingPlugin struct { +type schedulerPlugin struct { config *plugin.Config api schedapi.SchedulerApi client *client.Client @@ -355,14 +355,14 @@ type schedulingPlugin struct { starting chan struct{} } -func (s *schedulingPlugin) Run(done <-chan struct{}) { +func (s *schedulerPlugin) Run(done <-chan struct{}) { defer close(s.starting) go runtime.Until(s.scheduleOne, pluginRecoveryDelay, done) } // hacked from GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/mesos_scheduler.go, // with the Modeler stuff removed since we don't use it because we have mesos. -func (s *schedulingPlugin) scheduleOne() { +func (s *schedulerPlugin) scheduleOne() { pod := s.config.NextPod() // pods which are pre-scheduled (i.e. NodeName is set) are deleted by the kubelet @@ -409,7 +409,7 @@ func (s *schedulingPlugin) scheduleOne() { // host="..." | host="..." ; perhaps no updates to process? // // TODO(jdef) this needs an integration test -func (s *schedulingPlugin) reconcileTask(t *podtask.T) { +func (s *schedulerPlugin) reconcileTask(t *podtask.T) { log.V(1).Infof("reconcile pod %v, assigned to slave %q", t.Pod.Name, t.Spec.AssignedSlave) ctx := api.WithNamespace(api.NewDefaultContext(), t.Pod.Namespace) pod, err := s.client.Pods(api.NamespaceValue(ctx)).Get(t.Pod.Name) diff --git a/contrib/mesos/pkg/scheduler/plugin_test.go b/contrib/mesos/pkg/scheduler/plugin_test.go index 65dc97b5663..5d2db699cf7 100644 --- a/contrib/mesos/pkg/scheduler/plugin_test.go +++ b/contrib/mesos/pkg/scheduler/plugin_test.go @@ -425,7 +425,7 @@ type lifecycleTest struct { apiServer *TestServer driver *joinableDriver eventObs *EventObserver - plugin *schedulingPlugin + plugin *schedulerPlugin podsListWatch *MockPodsListWatch scheduler *MesosScheduler schedulerProc *ha.SchedulerProcess @@ -491,7 +491,7 @@ func newLifecycleTest(t *testing.T) lifecycleTest { config.Recorder = eventObs // create plugin - plugin := NewPlugin(config).(*schedulingPlugin) + plugin := NewPlugin(config).(*schedulerPlugin) assert.NotNil(plugin) // create mock mesos scheduler driver