mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 22:34:55 +00:00
Merge pull request #2199 from hashicorp/f-stats
Adds consul info data into /v1/agent/self endpoint.
This commit is contained in:
commit
49424aefa0
@ -16,6 +16,7 @@ type AgentSelf struct {
|
|||||||
Config *Config
|
Config *Config
|
||||||
Coord *coordinate.Coordinate
|
Coord *coordinate.Coordinate
|
||||||
Member serf.Member
|
Member serf.Member
|
||||||
|
Stats map[string]map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
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,
|
Config: s.agent.config,
|
||||||
Coord: c,
|
Coord: c,
|
||||||
Member: s.agent.LocalMember(),
|
Member: s.agent.LocalMember(),
|
||||||
|
Stats: s.agent.Stats(),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user