Switch to versioned ListOptions in client.

This commit is contained in:
Wojciech Tyczynski
2015-12-10 10:39:03 +01:00
parent 4ef062c22f
commit 960808bf08
167 changed files with 602 additions and 671 deletions

View File

@@ -20,7 +20,6 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/watch"
)
@@ -32,11 +31,11 @@ type EndpointsNamespacer interface {
// EndpointsInterface has methods to work with Endpoints resources
type EndpointsInterface interface {
Create(endpoints *api.Endpoints) (*api.Endpoints, error)
List(opts unversioned.ListOptions) (*api.EndpointsList, error)
List(opts api.ListOptions) (*api.EndpointsList, error)
Get(name string) (*api.Endpoints, error)
Delete(name string) error
Update(endpoints *api.Endpoints) (*api.Endpoints, error)
Watch(opts unversioned.ListOptions) (watch.Interface, error)
Watch(opts api.ListOptions) (watch.Interface, error)
}
// endpoints implements EndpointsInterface
@@ -58,7 +57,7 @@ func (c *endpoints) Create(endpoints *api.Endpoints) (*api.Endpoints, error) {
}
// List takes a selector, and returns the list of endpoints that match that selector
func (c *endpoints) List(opts unversioned.ListOptions) (result *api.EndpointsList, err error) {
func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) {
result = &api.EndpointsList{}
err = c.r.Get().
Namespace(c.ns).
@@ -82,7 +81,7 @@ func (c *endpoints) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested endpoints for a service.
func (c *endpoints) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.r.Get().
Prefix("watch").
Namespace(c.ns).