Adding ListMinions() API to pkg/client.

This commit is contained in:
Vishnu Kannan 2014-08-27 18:57:29 +00:00
parent 923b2c12c2
commit a4b00e33e0

View File

@ -40,6 +40,7 @@ type Interface interface {
ReplicationControllerInterface
ServiceInterface
VersionInterface
MinionInterface
}
// PodInterface has methods to work with Pod resources
@ -74,6 +75,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
@ -322,3 +327,8 @@ func (c *Client) ServerVersion() (*version.Info, error) {
}
return &info, nil
}
func (c *Client) ListMinions() (minionList api.MinionList, err error) {
err = c.Get().Path("minions").Do().Into(&minionList)
return
}