Make label and field selector query strings versionable.

This commit is contained in:
Brendan Burns
2015-03-09 21:45:35 -07:00
parent 0aee25e065
commit 266234f3b9
22 changed files with 92 additions and 74 deletions

View File

@@ -100,8 +100,8 @@ func (e *events) List(label, field labels.Selector) (*api.EventList, error) {
err := e.client.Get().
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
Resource("events").
SelectorParam("labels", label).
SelectorParam("fields", field).
SelectorParam(api.LabelSelectorQueryParam(e.client.APIVersion()), label).
SelectorParam(api.FieldSelectorQueryParam(e.client.APIVersion()), field).
Do().
Into(result)
return result, err
@@ -130,8 +130,8 @@ func (e *events) Watch(label, field labels.Selector, resourceVersion string) (wa
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
Resource("events").
Param("resourceVersion", resourceVersion).
SelectorParam("labels", label).
SelectorParam("fields", field).
SelectorParam(api.LabelSelectorQueryParam(e.client.APIVersion()), label).
SelectorParam(api.FieldSelectorQueryParam(e.client.APIVersion()), field).
Watch()
}