func (rs *REST) getComponentStatus(name string, server apiserver.Server) *api.ComponentStatus { status, msg, err := server.DoServerCheck(rs.prober) errorMsg := "" if err != nil { errorMsg = err.Error() } c := &api.ComponentCondition{ Type: api.ComponentHealthy, Status: ToConditionStatus(status), Message: msg, Error: errorMsg, } retVal := &api.ComponentStatus{ Conditions: []api.ComponentCondition{*c}, } retVal.Name = name return retVal }
func (rs *REST) getComponentStatus(name string, server apiserver.Server) *api.ComponentStatus { transport := rs.rt status, msg, err := server.DoServerCheck(transport) var errorMsg string if err != nil { errorMsg = err.Error() } else { errorMsg = "nil" } c := &api.ComponentCondition{ Type: api.ComponentHealthy, Status: ToConditionStatus(status), Message: msg, Error: errorMsg, } retVal := &api.ComponentStatus{ Conditions: []api.ComponentCondition{*c}, } retVal.Name = name return retVal }