rename probe.Status to probe.Result.

This commit is contained in:
Mike Danese
2015-01-30 17:03:57 -08:00
parent 8e6f5c7201
commit 14bfec92f2
14 changed files with 22 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ type validator struct {
}
// TODO: can this use pkg/probe/http
func (s *Server) check(client httpGet) (probe.Status, string, error) {
func (s *Server) check(client httpGet) (probe.Result, string, error) {
resp, err := client.Get("http://" + net.JoinHostPort(s.Addr, strconv.Itoa(s.Port)) + s.Path)
if err != nil {
return probe.Unknown, "", err
@@ -66,7 +66,7 @@ func (s *Server) check(client httpGet) (probe.Status, string, error) {
type ServerStatus struct {
Component string `json:"component,omitempty"`
Health string `json:"health,omitempty"`
HealthCode probe.Status `json:"healthCode,omitempty"`
HealthCode probe.Result `json:"healthCode,omitempty"`
Msg string `json:"msg,omitempty"`
Err string `json:"err,omitempty"`
}

View File

@@ -54,7 +54,7 @@ func TestValidate(t *testing.T) {
tests := []struct {
err error
data string
expectedStatus probe.Status
expectedStatus probe.Result
code int
expectErr bool
}{