Commit cbbe61d1 authored by derekwaynecarr's avatar derekwaynecarr

Fix path ordering in client

parent 6694a455
......@@ -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).
......
......@@ -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()
......
......@@ -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).
......
......@@ -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).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment