2016-04-29 18:06:19 +00:00
|
|
|
package agent
|
|
|
|
|
2016-06-12 16:32:38 +00:00
|
|
|
import "net/http"
|
2016-04-29 18:06:19 +00:00
|
|
|
|
2016-05-24 23:41:35 +00:00
|
|
|
func (s *HTTPServer) ClientStatsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
2016-04-29 18:06:19 +00:00
|
|
|
if s.agent.client == nil {
|
|
|
|
return nil, clientNotRunning
|
|
|
|
}
|
2016-05-09 19:24:03 +00:00
|
|
|
|
|
|
|
clientStats := s.agent.client.StatsReporter()
|
2016-06-12 16:32:38 +00:00
|
|
|
return clientStats.LatestHostStats(), nil
|
2016-05-18 05:11:25 +00:00
|
|
|
}
|