Support timeout in watch requests

This commit is contained in:
Wojciech Tyczynski
2015-10-16 15:07:14 +02:00
parent 40b6f1cc28
commit f4d75e0a0a
85 changed files with 256 additions and 160 deletions

View File

@@ -37,7 +37,7 @@ type LimitRangeInterface interface {
Delete(name string) error
Create(limitRange *api.LimitRange) (*api.LimitRange, error)
Update(limitRange *api.LimitRange) (*api.LimitRange, error)
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
Watch(label labels.Selector, field fields.Selector, opts api.ListOptions) (watch.Interface, error)
}
// limitRanges implements LimitRangesNamespacer interface
@@ -92,12 +92,12 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange
}
// Watch returns a watch.Interface that watches the requested resource
func (c *limitRanges) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) {
func (c *limitRanges) Watch(label labels.Selector, field fields.Selector, opts api.ListOptions) (watch.Interface, error) {
return c.r.Get().
Prefix("watch").
Namespace(c.ns).
Resource("limitRanges").
Param("resourceVersion", resourceVersion).
VersionedParams(&opts, api.Scheme).
LabelsSelectorParam(label).
FieldsSelectorParam(field).
Watch()