// Run function starts all the infomers and waits for an initial sync.
Run function starts all the infomers and waits for an initial sync.
// Run function starts all the infomers and waits for an initial sync .
func (i *InformerCollection) Run(stopCh chan struct{}) {
	go i.Endpoints.Run(stopCh)
	go i.Service.Run(stopCh)
	go i.Secret.Run(stopCh)
	glog.V(1).Infoln("start waiting for initial cache sync")
	if !cache.WaitForCacheSync(stopCh, i.Endpoints.HasSynced, i.Service.HasSynced, i.Secret.HasSynced) {
		glog.V(1).Infoln("initial sync wait stopped")
		runtime.HandleError(fmt.Errorf("failed to do initial sync on resources required for ingress"))
		return
	}
	go i.Ingress.Run(stopCh)
	if !cache.WaitForCacheSync(stopCh, i.Ingress.HasSynced) {
		glog.V(1).Infoln("ingress cache wait stopped")
		runtime.HandleError(fmt.Errorf("failed to do initial sync on ingress"))
		return
	}
	glog.V(1).Infoln("ingress initial sync done")
}
func ( i * InformerCollection ) Run ( stopCh chan struct { } ) { go i . Endpoints . Run ( stopCh ) go i . Service . Run ( stopCh ) go i . Secret . Run ( stopCh ) glog . V ( 1 ) . Infoln ( " " ) if ! cache . WaitForCacheSync ( stopCh , i . Endpoints . HasSynced , i . Service . HasSynced , i . Secret . HasSynced ) { glog . V ( 1 ) . Infoln ( " " ) runtime . HandleError ( fmt . Errorf ( " " ) ) return } go i . Ingress . Run ( stopCh ) if ! cache . WaitForCacheSync ( stopCh , i . Ingress . HasSynced ) { glog . V ( 1 ) . Infoln ( " " ) runtime . HandleError ( fmt . Errorf ( " " ) ) return } glog . V ( 1 ) . Infoln ( " " ) }
Run function starts all the infomers and waits for an initial sync.
Run function starts all the infomers and waits for an initial sync .