Move the discovery client to its own package

This commit is contained in:
Kris
2016-02-25 10:38:35 -08:00
parent a20258efae
commit dbde4fd798
19 changed files with 93 additions and 87 deletions

View File

@@ -22,6 +22,7 @@ import (
"strings"
"k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/typed/discovery"
)
// Interface holds the methods for clients of Kubernetes,
@@ -46,7 +47,7 @@ type Interface interface {
Autoscaling() AutoscalingInterface
Batch() BatchInterface
Extensions() ExtensionsInterface
Discovery() DiscoveryInterface
Discovery() discovery.DiscoveryInterface
}
func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
@@ -118,16 +119,7 @@ type Client struct {
*AutoscalingClient
*BatchClient
*ExtensionsClient
*DiscoveryClient
}
func stringDoesntExistIn(str string, slice []string) bool {
for _, s := range slice {
if s == str {
return false
}
}
return true
*discovery.DiscoveryClient
}
// IsTimeout tests if this is a timeout error in the underlying transport.
@@ -164,6 +156,6 @@ func (c *Client) Extensions() ExtensionsInterface {
return c.ExtensionsClient
}
func (c *Client) Discovery() DiscoveryInterface {
func (c *Client) Discovery() discovery.DiscoveryInterface {
return c.DiscoveryClient
}