address comments

This commit is contained in:
Alex Dadgar
2016-06-13 17:32:18 -07:00
parent 1e4ec6b2b3
commit f320b5a76f
4 changed files with 19 additions and 20 deletions

View File

@@ -412,7 +412,7 @@ func (a *Agent) setupClient() error {
}
a.client = client
// Create the Nomad Server services for Consul
// Create the Nomad Client services for Consul
if a.config.Consul.AutoRegister && a.config.Consul.ClientServiceName != "" {
httpServ := &structs.Service{
Name: a.config.Consul.ClientServiceName,

View File

@@ -54,7 +54,7 @@ const (
// nomadServicePrefix is the first prefix that scopes all Nomad registered
// services
nomadServicePrefix = "nomad-registered-service"
nomadServicePrefix = "_nomad"
// The periodic time interval for syncing services and checks with Consul
syncInterval = 5 * time.Second
@@ -953,8 +953,8 @@ func (c *Syncer) runCheck(check Check) {
}
}
// KeepDomains prunes all services that do not exist in the passed domains
func (c *Syncer) KeepDomains(domains []ServiceDomain) error {
// ReapUnmatched prunes all services that do not exist in the passed domains
func (c *Syncer) ReapUnmatched(domains []ServiceDomain) error {
servicesInConsul, err := c.ConsulClient().Agent().Services()
if err != nil {
return err