Sync node status from node controller to master.

This commit is contained in:
Deyuan Deng
2015-01-16 17:28:20 -05:00
parent e619f303d7
commit c793c4f0ab
16 changed files with 584 additions and 505 deletions

View File

@@ -45,8 +45,8 @@ type HTTPGetInterface interface {
}
// DoHTTPProbe checks if a GET request to the url succeeds.
// If the HTTP response code is successful (i.e. 400 > code >= 200), it returns Healthy.
// If the HTTP response code is unsuccessful or HTTP communication fails, it returns Unhealthy.
// If the HTTP response code is successful (i.e. 400 > code >= 200), it returns Success.
// If the HTTP response code is unsuccessful or HTTP communication fails, it returns Failure.
// This is exported because some other packages may want to do direct HTTP probes.
func DoHTTPProbe(url string, client HTTPGetInterface) (probe.Status, error) {
res, err := client.Get(url)