Step #1 in migrating the service controller away from the apiserver.

Start using the API server for listing services.
This commit is contained in:
Brendan Burns
2014-08-27 21:32:52 -07:00
parent 5bed06f614
commit fee2b90608
4 changed files with 114 additions and 35 deletions

View File

@@ -317,6 +317,11 @@ func (c *Client) WatchReplicationControllers(label, field labels.Selector, resou
Watch()
}
func (c *Client) ListServices(selector labels.Selector) (list api.ServiceList, err error) {
err = c.Get().Path("services").SelectorParam("labels", selector).Do().Into(&list)
return
}
// GetService returns information about a particular service.
func (c *Client) GetService(name string) (result api.Service, err error) {
err = c.Get().Path("services").Path(name).Do().Into(&result)