MCPcopy
hub / github.com/kubernetes/client-go / Run

Method Run

tools/cache/reflector.go:121–128  ·  view source on GitHub ↗

Run starts a watch and handles watch events. Will restart the watch if it is closed. Run will exit when stopCh is closed.

(stopCh <-chan struct{})

Source from the content-addressed store, hash-verified

119// Run starts a watch and handles watch events. Will restart the watch if it is closed.
120// Run will exit when stopCh is closed.
121func (r *Reflector) Run(stopCh <-chan struct{}) {
122 klog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedType, r.resyncPeriod, r.name)
123 wait.Until(func() {
124 if err := r.ListAndWatch(stopCh); err != nil {
125 utilruntime.HandleError(err)
126 }
127 }, r.period, stopCh)
128}
129
130var (
131 // nothing will ever be sent down this channel

Callers 1

TestRunUntilFunction · 0.95

Calls 1

ListAndWatchMethod · 0.95

Tested by 1

TestRunUntilFunction · 0.76