// Run starts syncing the controller.
Run starts syncing the controller.
// Run starts syncing the controller .
func (c *CSIDriverController) Run(ctx context.Context, workers int) {
	defer utilruntime.HandleCrash()
	defer c.queue.ShutDown()
	if c.nodeManifest == nil {
		klog.Errorf("Controller doesn't have a CSI Node Service, quitting")
		return
	}
	stopCh := ctx.Done()
	if !cache.WaitForCacheSync(stopCh, c.informersSynced...) {
		return
	}
	klog.V(4).Infof("Caches synced, running the controller")
	for i := 0; i < workers; i++ {
		go wait.Until(c.worker, time.Second, stopCh)
	}
	<-stopCh
}
func ( c * CSIDriverController ) Run ( ctx context . Context , workers int ) { defer utilruntime . HandleCrash ( ) defer c . queue . ShutDown ( ) if c . nodeManifest == nil { klog . Errorf ( " " ) return } stopCh := ctx . Done ( ) if ! cache . WaitForCacheSync ( stopCh , c . informersSynced ... ) { return } klog . V ( 4 ) . Infof ( " " ) for i := 0 ; i < workers ; i ++ { go wait . Until ( c . worker , time . Second , stopCh ) } <- stopCh }
Run starts syncing the controller.
Run starts syncing the controller .