Rename client/config/config's ConsulConfig to ConsulAgentConfig
A follow up commit to the previous rename. More to come.
This commit is contained in:
parent
e97652bbfb
commit
73e173673e
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue