mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 00:46:43 +00:00
http: add PrimaryDatacenter to the /v1/agent/self response
This field is available in DebugConfig, but that field is not stable and could change at any time. The consul-k8s needs to be able to detect the primary DC for tests, so adding this field to the stable part of the API response.
This commit is contained in:
parent
119960211d
commit
3726cb52c7
@ -75,6 +75,7 @@ func (s *HTTPHandlers) AgentSelf(resp http.ResponseWriter, req *http.Request) (i
|
||||
|
||||
config := struct {
|
||||
Datacenter string
|
||||
PrimaryDatacenter string
|
||||
NodeName string
|
||||
NodeID string
|
||||
Revision string
|
||||
@ -82,6 +83,7 @@ func (s *HTTPHandlers) AgentSelf(resp http.ResponseWriter, req *http.Request) (i
|
||||
Version string
|
||||
}{
|
||||
Datacenter: s.agent.config.Datacenter,
|
||||
PrimaryDatacenter: s.agent.config.PrimaryDatacenter,
|
||||
NodeName: s.agent.config.NodeName,
|
||||
NodeID: string(s.agent.config.NodeID),
|
||||
Revision: s.agent.config.Revision,
|
||||
|
Loading…
x
Reference in New Issue
Block a user