diff --git a/pkg/client/client.go b/pkg/client/client.go index d624442910a..5128e3693e8 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -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 +}