github.com/maier/nomad@v0.4.1-0.20161110003312-a9e3d0b8549d/command/agent/stats_endpoint.go (about) 1 package agent 2 3 import "net/http" 4 5 func (s *HTTPServer) ClientStatsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) { 6 if s.agent.client == nil { 7 return nil, clientNotRunning 8 } 9 10 clientStats := s.agent.client.StatsReporter() 11 return clientStats.LatestHostStats(), nil 12 }