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:
Daniel Nephin 2021-06-11 13:44:07 -04:00 committed by GitHub
commit 69262022da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 12 deletions

View File

@ -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,