Merge pull request #1077 from brendandburns/service

Step #1 in migrating the service controller away from the apiserver.
This commit is contained in:
Daniel Smith
2014-09-02 14:03:52 -07:00
4 changed files with 114 additions and 35 deletions

View File

@@ -318,6 +318,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)