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

@@ -112,7 +112,8 @@ func (c *realRecyclerClient) WatchPod(name, namespace, resourceVersion string, s
return c.client.Pods(namespace).List(labels.Everything(), fieldSelector)
},
WatchFunc: func(resourceVersion string) (watch.Interface, error) {
return c.client.Pods(namespace).Watch(labels.Everything(), fieldSelector, resourceVersion)
options := api.ListOptions{ResourceVersion: resourceVersion}
return c.client.Pods(namespace).Watch(labels.Everything(), fieldSelector, options)
},
}
queue := cache.NewFIFO(cache.MetaNamespaceKeyFunc)