Merge pull request #1058 from vishh/add_list_minions
Adding ListMinions() API to pkg/client.
This commit is contained in:
@@ -41,6 +41,7 @@ type Interface interface {
|
||||
ReplicationControllerInterface
|
||||
ServiceInterface
|
||||
VersionInterface
|
||||
MinionInterface
|
||||
}
|
||||
|
||||
// PodInterface has methods to work with Pod resources
|
||||
@@ -78,6 +79,10 @@ type VersionInterface interface {
|
||||
ServerVersion() (*version.Info, error)
|
||||
}
|
||||
|
||||
type MinionInterface interface {
|
||||
ListMinions() (api.MinionList, error)
|
||||
}
|
||||
|
||||
// Client is the actual implementation of a Kubernetes client.
|
||||
type Client struct {
|
||||
*RESTClient
|
||||
@@ -369,3 +374,9 @@ func (c *Client) ServerVersion() (*version.Info, error) {
|
||||
}
|
||||
return &info, nil
|
||||
}
|
||||
|
||||
// Lists all the minions in the cluster.
|
||||
func (c *Client) ListMinions() (minionList api.MinionList, err error) {
|
||||
err = c.Get().Path("minions").Do().Into(&minionList)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user