remove pkg/health and move everything over to pkg/probe

This commit is contained in:
Mike Danese
2015-01-24 19:22:18 -08:00
parent 5ee4071cf1
commit a298402bd4
21 changed files with 46 additions and 955 deletions

View File

@@ -26,7 +26,8 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/health"
"github.com/GoogleCloudPlatform/kubernetes/pkg/probe"
httprobe "github.com/GoogleCloudPlatform/kubernetes/pkg/probe/http"
)
// ErrPodInfoNotAvailable may be returned when the requested pod info is not available.
@@ -40,7 +41,7 @@ type KubeletClient interface {
// KubeletHealthchecker is an interface for healthchecking kubelets
type KubeletHealthChecker interface {
HealthCheck(host string) (health.Status, error)
HealthCheck(host string) (probe.Status, error)
}
// PodInfoGetter is an interface for things that can get information about a pod's containers.
@@ -146,8 +147,8 @@ func (c *HTTPKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
return status, nil
}
func (c *HTTPKubeletClient) HealthCheck(host string) (health.Status, error) {
return health.DoHTTPCheck(fmt.Sprintf("%s/healthz", c.url(host)), c.Client)
func (c *HTTPKubeletClient) HealthCheck(host string) (probe.Status, error) {
return httprobe.DoHTTPProbe(fmt.Sprintf("%s/healthz", c.url(host)), c.Client)
}
// FakeKubeletClient is a fake implementation of KubeletClient which returns an error
@@ -160,6 +161,6 @@ func (c FakeKubeletClient) GetPodStatus(host, podNamespace string, podID string)
return api.PodStatusResult{}, errors.New("Not Implemented")
}
func (c FakeKubeletClient) HealthCheck(host string) (health.Status, error) {
return health.Unknown, errors.New("Not Implemented")
func (c FakeKubeletClient) HealthCheck(host string) (probe.Status, error) {
return probe.Unknown, errors.New("Not Implemented")
}