Skip to content

Commit

Permalink
Change order of elements on health check (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsafoodpanda authored Apr 19, 2018
1 parent 7e83b40 commit 63ed6bc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ranger_http/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ func (configuration healthCheckConfiguration) WithVersion(versionPath string) he

type healthCheckResponse struct {
HTTPStatus int `json:"http-status"`
Version healthCheckVersion `json:"version"`
Time float64 `json:"time"`
Status bool `json:"status"`
Host string `json:"hostname"`
Services map[string]interface{} `json:"checks"`
Version healthCheckVersion `json:"version"`
Host string `json:"host"`
}

//WithHealthCheckFor ...
Expand Down Expand Up @@ -130,10 +131,11 @@ func HealthCheckHandler(configuration healthCheckConfiguration) httprouter.Handl
json.NewEncoder(w).Encode(
healthCheckResponse{
HTTPStatus: statusCode,
Time: ElapsedTimeSince(sAll),
Services: mapServices,
Version: configuration.Version,
Time: ElapsedTimeSince(sAll),
Status: service.Status,
Host: hostname,
Services: mapServices,
})
}
}
Expand Down

0 comments on commit 63ed6bc

Please sign in to comment.