From 41904f262fd20cc8fb07d2a25b6996219399d98d Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 1 Jun 2016 02:41:04 -0700 Subject: [PATCH] Clean up some docs and comments to be more accurate --- client/client.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/client.go b/client/client.go index 640e6efbc..2977ff348 100644 --- a/client/client.go +++ b/client/client.go @@ -200,7 +200,7 @@ func NewClient(cfg *config.Config, consulSyncer *consul.Syncer) (*Client, error) // Setup the Consul syncer if err := c.setupConsulSyncer(); err != nil { - return nil, fmt.Errorf("failed to create Consul syncer: %v") + return nil, fmt.Errorf("failed to create client Consul syncer: %v") } // Register and then start heartbeating to the servers. @@ -1213,12 +1213,13 @@ func (c *Client) addAlloc(alloc *structs.Allocation) error { return nil } -// setupConsulSyncer creates a consul.Syncer +// setupConsulSyncer creates Client-mode consul.Syncer callbacks that are +// executed periodically. func (c *Client) setupConsulSyncer() error { // The bootstrapFn callback handler is used to periodically poll // Consul to look up the Nomad Servers in Consul. In the event the - // heartbeat deadline has been exceeded and this Agent is orphaned - // from its cluster, periodically poll Consul to reattach this Agent + // heartbeat deadline has been exceeded and this Client is orphaned + // from its servers, periodically poll Consul to reattach this Client // to its cluster and automatically recover from a detached state. bootstrapFn := func() { now := time.Now()