Merge selectors with ListOptions.

This commit is contained in:
Wojciech Tyczynski
2015-10-27 14:47:58 +01:00
parent cd7e4bd6bb
commit 9c53f301f1
27 changed files with 138 additions and 269 deletions

View File

@@ -22,8 +22,6 @@ import (
"net/url"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch"
)
@@ -62,8 +60,7 @@ type Lister interface {
// This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object)
NewList() runtime.Object
// List selects resources in the storage which match to the selector. 'options' can be nil.
// TODO: Move 'label' and 'field' to 'options'.
List(ctx api.Context, label labels.Selector, field fields.Selector, options *api.ListOptions) (runtime.Object, error)
List(ctx api.Context, options *api.ListOptions) (runtime.Object, error)
}
// Getter is an object that can retrieve a named RESTful resource.
@@ -184,8 +181,7 @@ type Watcher interface {
// are supported; an error should be returned if 'field' tries to select on a field that
// isn't supported. 'resourceVersion' allows for continuing/starting a watch at a
// particular version.
// TODO: Replace 'label', 'field' and 'resourceVersion' with ListOptions.
Watch(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
Watch(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
}
// StandardStorage is an interface covering the common verbs. Provided for testing whether a