mirror of https://github.com/status-im/consul.git
Merge pull request #10378 from hashicorp/dnephin/agent-self-primary-dc
http: add PrimaryDatacenter to the /v1/agent/self response
This commit is contained in:
commit
a015a6c1eb
|
@ -74,19 +74,21 @@ func (s *HTTPHandlers) AgentSelf(resp http.ResponseWriter, req *http.Request) (i
|
||||||
}
|
}
|
||||||
|
|
||||||
config := struct {
|
config := struct {
|
||||||
Datacenter string
|
Datacenter string
|
||||||
NodeName string
|
PrimaryDatacenter string
|
||||||
NodeID string
|
NodeName string
|
||||||
Revision string
|
NodeID string
|
||||||
Server bool
|
Revision string
|
||||||
Version string
|
Server bool
|
||||||
|
Version string
|
||||||
}{
|
}{
|
||||||
Datacenter: s.agent.config.Datacenter,
|
Datacenter: s.agent.config.Datacenter,
|
||||||
NodeName: s.agent.config.NodeName,
|
PrimaryDatacenter: s.agent.config.PrimaryDatacenter,
|
||||||
NodeID: string(s.agent.config.NodeID),
|
NodeName: s.agent.config.NodeName,
|
||||||
Revision: s.agent.config.Revision,
|
NodeID: string(s.agent.config.NodeID),
|
||||||
Server: s.agent.config.ServerMode,
|
Revision: s.agent.config.Revision,
|
||||||
Version: s.agent.config.Version,
|
Server: s.agent.config.ServerMode,
|
||||||
|
Version: s.agent.config.Version,
|
||||||
}
|
}
|
||||||
return Self{
|
return Self{
|
||||||
Config: config,
|
Config: config,
|
||||||
|
|
Loading…
Reference in New Issue