mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
rename probe.Status to probe.Result.
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
@@ -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
|
||||
}{
|
||||
|
Reference in New Issue
Block a user