Pass resource version to storage List operation.

This commit is contained in:
Wojciech Tyczynski
2015-10-26 14:56:51 +01:00
parent a094a6e3de
commit aa30e38183
32 changed files with 82 additions and 69 deletions

View File

@@ -61,8 +61,9 @@ type Lister interface {
// NewList returns an empty object that can be used with the List call.
// 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.
List(ctx api.Context, label labels.Selector, field fields.Selector) (runtime.Object, error)
// 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)
}
// Getter is an object that can retrieve a named RESTful resource.
@@ -183,6 +184,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)
}