Ejemplo n.º 1
0
// RunUntil starts a watch and handles watch events. Will restart the watch if it is closed.
// RunUntil starts a goroutine and returns immediately. It will exit when stopCh is closed.
func (r *Reflector) RunUntil(stopCh <-chan struct{}) {
	go util.Until(func() { r.ListAndWatch(stopCh) }, r.period, stopCh)
}
Ejemplo n.º 2
0
// Run starts a watch and handles watch events. Will restart the watch if it is closed.
// Run starts a goroutine and returns immediately.
func (r *Reflector) Run() {
	go util.Until(func() { r.ListAndWatch(util.NeverStop) }, r.period, util.NeverStop)
}