mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
remove pkg/health and move everything over to pkg/probe
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user