// Run starts the control loop with workers processing the items
Run starts the control loop with workers processing the items
// Run starts the control loop with workers processing the items
func (c *Controller) Run(workers int, stopCh <-chan struct{}) {
	defer utilruntime.HandleCrash()
	defer c.queue.ShutDown()
	klog.Info("starting arktos network controller")
	klog.V(5).Info("waiting for informer caches to sync")
	if !cache.WaitForCacheSync(stopCh, c.cacheSynced) {
		klog.Error("failed to wait for cache to sync")
		return
	}
	klog.V(5).Info("staring workers of arktos network controller")
	for i := 0; i < workers; i++ {
		go wait.Until(c.runWorker, time.Second, stopCh)
	}
	klog.V(5).Infof("%d workers started", workers)
	<-stopCh
	klog.Info("shutting down arktos network controller")
}
func ( c * Controller ) Run ( workers int , stopCh <- chan struct { } ) { defer utilruntime . HandleCrash ( ) defer c . queue . ShutDown ( ) klog . Info ( " " ) klog . V ( 5 ) . Info ( " " ) if ! cache . WaitForCacheSync ( stopCh , c . cacheSynced ) { klog . Error ( " " ) return } klog . V ( 5 ) . Info ( " " ) for i := 0 ; i < workers ; i ++ { go wait . Until ( c . runWorker , time . Second , stopCh ) } klog . V ( 5 ) . Infof ( " " , workers ) <- stopCh klog . Info ( " " ) }
Run starts the control loop with workers processing the items
Run starts the control loop with workers processing the items