Merge pull request #19752 from hongchaodeng/listandwatch

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-01-15 23:01:37 -08:00
commit 4010c214e4

View File

@ -222,7 +222,9 @@ func (r *Reflector) canForceResyncNow() bool {
return r.now().Add(forceResyncThreshold).After(r.nextResync)
}
// Returns error if ListAndWatch didn't even tried to initialize watch.
// ListAndWatch first lists all items and get the resource version at the moment of call,
// and then use the resource version to watch.
// It returns error if ListAndWatch didn't even try to initialize watch.
func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
var resourceVersion string
resyncCh, cleanup := r.resyncChan()