コード例 #1
0
ファイル: reflector.go プロジェクト: jchauncey/kubeclient
// 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)
}
コード例 #2
0
ファイル: reflector.go プロジェクト: jchauncey/kubeclient
// 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)
}