Adds consul info data into /v1/agent/self endpoint.

This commit is contained in:
James Phillips 2016-07-20 15:12:26 -07:00
parent b89fab4c7f
commit 5d83d507b4
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ type AgentSelf struct {
Config *Config
Coord *coordinate.Coordinate
Member serf.Member
Stats map[string]map[string]string
}
func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
@ -31,6 +32,7 @@ func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (int
Config: s.agent.config,
Coord: c,
Member: s.agent.LocalMember(),
Stats: s.agent.Stats(),
}, nil
}