mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
remove dead code in client
This commit is contained in:
parent
c458cd7bb7
commit
f565646ea5
@ -25,7 +25,6 @@ import (
|
||||
|
||||
"github.com/emicklei/go-restful/swagger"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/version"
|
||||
@ -162,25 +161,6 @@ func (c *Client) ServerAPIVersions() (*unversioned.APIVersions, error) {
|
||||
return &v, nil
|
||||
}
|
||||
|
||||
type ComponentValidatorInterface interface {
|
||||
ValidateComponents() (*api.ComponentStatusList, error)
|
||||
}
|
||||
|
||||
// ValidateComponents retrieves and parses the master's self-monitored cluster state.
|
||||
// TODO: This should hit the versioned endpoint when that is implemented.
|
||||
func (c *Client) ValidateComponents() (*api.ComponentStatusList, error) {
|
||||
body, err := c.Get().AbsPath("/validate").DoRaw()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
statuses := []api.ComponentStatus{}
|
||||
if err := json.Unmarshal(body, &statuses); err != nil {
|
||||
return nil, fmt.Errorf("got '%s': %v", string(body), err)
|
||||
}
|
||||
return &api.ComponentStatusList{Items: statuses}, nil
|
||||
}
|
||||
|
||||
// SwaggerSchemaInterface has a method to retrieve the swagger schema. Used in
|
||||
// client.Interface
|
||||
type SwaggerSchemaInterface interface {
|
||||
|
Loading…
Reference in New Issue
Block a user