Rename client/config/config's ConsulConfig to ConsulAgentConfig

A follow up commit to the previous rename.  More to come.
This commit is contained in:
Sean Chittenden 2016-05-21 16:37:21 -05:00
parent e97652bbfb
commit 73e173673e
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
4 changed files with 6 additions and 5 deletions

View File

@ -1268,7 +1268,7 @@ func (c *Client) addAlloc(alloc *structs.Allocation) error {
// setupConsulClient creates a ConsulService
func (c *Client) setupConsulClient() error {
cs, err := consul.NewConsulService(c.config.ConsulConfig, c.logger)
cs, err := consul.NewConsulService(c.config.ConsulAgentConfig, c.logger)
c.consulService = cs
return err
}

View File

@ -72,7 +72,7 @@ func testServer(t *testing.T, cb func(*nomad.Config)) (*nomad.Server, string) {
func testClient(t *testing.T, cb func(c *config.Config)) *Client {
conf := DefaultConfig()
conf.DevMode = true
conf.ConsulConfig = &consul.AgentConfig{}
conf.ConsulAgentConfig = &consul.AgentConfig{}
if cb != nil {
cb(conf)
}

View File

@ -110,8 +110,9 @@ type Config struct {
// Revision is the commit number of the Nomad client
Revision string
// ConsulConfig is the configuration to connect with Consul Agent
ConsulConfig *consul.AgentConfig
// ConsulAgentConfig is the configuration to connect with Consul
// Agent
ConsulAgentConfig *consul.AgentConfig
// StatsDataPoints is the number of resource usage data points the Nomad
// client keeps in memory

View File

@ -272,7 +272,7 @@ func (a *Agent) clientConfig() (*clientconfig.Config, error) {
conf.Version = fmt.Sprintf("%s%s", a.config.Version, a.config.VersionPrerelease)
conf.Revision = a.config.Revision
conf.ConsulConfig = a.consulConfig
conf.ConsulAgentConfig = a.consulConfig
conf.StatsDataPoints = a.config.Client.StatsConfig.DataPoints
conf.StatsCollectionInterval = a.config.Client.StatsConfig.collectionInterval