From 802a8c459cd8466254b3a63ee3bfe4f671f9eddf Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 8 Jun 2016 13:38:00 -0400 Subject: [PATCH] Rename command/agent/consul/sync.go to syncer.go --- command/agent/consul/{sync.go => syncer.go} | 8 ++++---- command/agent/consul/{sync_test.go => syncer_test.go} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename command/agent/consul/{sync.go => syncer.go} (97%) rename command/agent/consul/{sync_test.go => syncer_test.go} (100%) diff --git a/command/agent/consul/sync.go b/command/agent/consul/syncer.go similarity index 97% rename from command/agent/consul/sync.go rename to command/agent/consul/syncer.go index 6c528ae31..ed556a31f 100644 --- a/command/agent/consul/sync.go +++ b/command/agent/consul/syncer.go @@ -427,7 +427,7 @@ func (c *Syncer) Run() { c.Shutdown() case <-c.notifyShutdownCh: sync.Stop() - c.logger.Printf("[INFO] consul.sync: shutting down sync for %q", c.serviceRegPrefix) + c.logger.Printf("[INFO] consul.syncer: shutting down sync for %q", c.serviceRegPrefix) return } } @@ -503,7 +503,7 @@ func (c *Syncer) consulPresent() bool { func (c *Syncer) runCheck(check Check) { res := check.Run() if res.Duration >= check.Timeout() { - c.logger.Printf("[DEBUG] consul.sync: check took time: %v, timeout: %v", res.Duration, check.Timeout()) + c.logger.Printf("[DEBUG] consul.syncer: check took time: %v, timeout: %v", res.Duration, check.Timeout()) } state := consul.HealthCritical output := res.Output @@ -521,7 +521,7 @@ func (c *Syncer) runCheck(check Check) { } if err := c.client.Agent().UpdateTTL(check.ID(), output, state); err != nil { if c.runChecks { - c.logger.Printf("[DEBUG] consul.sync: check %q failed, disabling Consul checks until until next successful sync: %v", check.ID(), err) + c.logger.Printf("[DEBUG] consul.syncer: check %q failed, disabling Consul checks until until next successful sync: %v", check.ID(), err) c.runChecks = false } else { c.runChecks = true @@ -541,7 +541,7 @@ func (c *Syncer) AddPeriodicHandler(name string, fn types.PeriodicCallback) bool c.periodicLock.Lock() defer c.periodicLock.Unlock() if _, found := c.periodicCallbacks[name]; found { - c.logger.Printf("[ERROR] consul.sync: failed adding handler %q", name) + c.logger.Printf("[ERROR] consul.syncer: failed adding handler %q", name) return false } c.periodicCallbacks[name] = fn diff --git a/command/agent/consul/sync_test.go b/command/agent/consul/syncer_test.go similarity index 100% rename from command/agent/consul/sync_test.go rename to command/agent/consul/syncer_test.go