Commit 4010c214 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #19752 from hongchaodeng/listandwatch

Auto commit by PR queue bot
parents f26713f9 9a10e95f
...@@ -222,7 +222,9 @@ func (r *Reflector) canForceResyncNow() bool { ...@@ -222,7 +222,9 @@ func (r *Reflector) canForceResyncNow() bool {
return r.now().Add(forceResyncThreshold).After(r.nextResync) 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 { func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
var resourceVersion string var resourceVersion string
resyncCh, cleanup := r.resyncChan() resyncCh, cleanup := r.resyncChan()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment