Fix path ordering in client

This commit is contained in:
derekwaynecarr 2014-12-16 16:11:45 -05:00
parent 6694a45542
commit cbbe61d115
4 changed files with 7 additions and 7 deletions

View File

@ -78,8 +78,8 @@ func (c *endpoints) Get(name string) (result *api.Endpoints, err error) {
// Watch returns a watch.Interface that watches the requested endpoints for a service.
func (c *endpoints) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return c.r.Get().
Namespace(c.ns).
Path("watch").
Namespace(c.ns).
Path("endpoints").
Param("resourceVersion", resourceVersion).
SelectorParam("labels", label).

View File

@ -65,8 +65,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) {
}
result := &api.Event{}
err := e.client.Post().
Path("events").
Namespace(event.Namespace).
Path("events").
Body(event).
Do().
Into(result)
@ -77,8 +77,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) {
func (e *events) List(label, field labels.Selector) (*api.EventList, error) {
result := &api.EventList{}
err := e.client.Get().
Path("events").
Namespace(e.namespace).
Path("events").
SelectorParam("labels", label).
SelectorParam("fields", field).
Do().
@ -94,9 +94,9 @@ func (e *events) Get(name string) (*api.Event, error) {
result := &api.Event{}
err := e.client.Get().
Namespace(e.namespace).
Path("events").
Path(name).
Namespace(e.namespace).
Do().
Into(result)
return result, err
@ -106,9 +106,9 @@ func (e *events) Get(name string) (*api.Event, error) {
func (e *events) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return e.client.Get().
Path("watch").
Namespace(e.namespace).
Path("events").
Param("resourceVersion", resourceVersion).
Namespace(e.namespace).
SelectorParam("labels", label).
SelectorParam("fields", field).
Watch()

View File

@ -95,8 +95,8 @@ func (c *replicationControllers) Delete(name string) error {
// Watch returns a watch.Interface that watches the requested controllers.
func (c *replicationControllers) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return c.r.Get().
Namespace(c.ns).
Path("watch").
Namespace(c.ns).
Path("replicationControllers").
Param("resourceVersion", resourceVersion).
SelectorParam("labels", label).

View File

@ -95,8 +95,8 @@ func (c *services) Delete(name string) error {
// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return c.r.Get().
Namespace(c.ns).
Path("watch").
Namespace(c.ns).
Path("services").
Param("resourceVersion", resourceVersion).
SelectorParam("labels", label).