Adding ListMinions() API to pkg/client.
This commit is contained in:
parent
923b2c12c2
commit
a4b00e33e0
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user