Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 45 for UntilWithContext (0.25 sec)

  1. pkg/controller/servicecidrs/servicecidrs_controller.go

    	if !cache.WaitForNamedCacheSync(controllerName, ctx.Done(), c.serviceCIDRsSynced, c.ipAddressSynced) {
    		return
    	}
    
    	for i := 0; i < workers; i++ {
    		go wait.UntilWithContext(ctx, c.worker, c.workerLoopPeriod)
    	}
    	<-ctx.Done()
    }
    
    func (c *Controller) addServiceCIDR(obj interface{}) {
    	cidr, ok := obj.(*networkingapiv1alpha1.ServiceCIDR)
    	if !ok {
    		return
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 18K bytes
    - Viewed (0)
  2. pkg/controller/nodeipam/ipam/range_allocator.go

    	defer logger.Info("Shutting down range CIDR allocator")
    
    	if !cache.WaitForNamedCacheSync("cidrallocator", ctx.Done(), r.nodesSynced) {
    		return
    	}
    
    	for i := 0; i < cidrUpdateWorkers; i++ {
    		go wait.UntilWithContext(ctx, r.runWorker, time.Second)
    	}
    
    	<-ctx.Done()
    }
    
    // runWorker is a long-running function that will continually call the
    // processNextWorkItem function in order to read and process a message on the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go

    }
    
    func TestUntilWithContext(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.TODO())
    	cancel()
    	UntilWithContext(ctx, func(context.Context) {
    		t.Fatal("should not have been invoked")
    	}, 0)
    
    	ctx, cancel = context.WithCancel(context.TODO())
    	called := make(chan struct{})
    	go func() {
    		UntilWithContext(ctx, func(context.Context) {
    			called <- struct{}{}
    		}, 0)
    		close(called)
    	}()
    	<-called
    	cancel()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  4. pkg/controller/volume/attachdetach/reconciler/reconciler.go

    	disableReconciliationSync   bool
    	disableForceDetachOnTimeout bool
    	recorder                    record.EventRecorder
    }
    
    func (rc *reconciler) Run(ctx context.Context) {
    	wait.UntilWithContext(ctx, rc.reconciliationLoopFunc(ctx), rc.loopPeriod)
    }
    
    // reconciliationLoopFunc this can be disabled via cli option disableReconciliation.
    // It periodically checks whether the attached volumes from actual state
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 22 21:02:38 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  5. pkg/controller/statefulset/stateful_set.go

    	if !cache.WaitForNamedCacheSync("stateful set", ctx.Done(), ssc.podListerSynced, ssc.setListerSynced, ssc.pvcListerSynced, ssc.revListerSynced) {
    		return
    	}
    
    	for i := 0; i < workers; i++ {
    		go wait.UntilWithContext(ctx, ssc.worker, time.Second)
    	}
    
    	<-ctx.Done()
    }
    
    // addPod adds the statefulset for the pod to the sync queue
    func (ssc *StatefulSetController) addPod(logger klog.Logger, obj interface{}) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  6. pkg/controller/deployment/deployment_controller.go

    	if !cache.WaitForNamedCacheSync("deployment", ctx.Done(), dc.dListerSynced, dc.rsListerSynced, dc.podListerSynced) {
    		return
    	}
    
    	for i := 0; i < workers; i++ {
    		go wait.UntilWithContext(ctx, dc.worker, time.Second)
    	}
    
    	<-ctx.Done()
    }
    
    func (dc *DeploymentController) addDeployment(logger klog.Logger, obj interface{}) {
    	d := obj.(*apps.Deployment)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  7. pkg/controller/endpoint/endpoints_controller.go

    	if !cache.WaitForNamedCacheSync("endpoint", ctx.Done(), e.podsSynced, e.servicesSynced, e.endpointsSynced) {
    		return
    	}
    
    	for i := 0; i < workers; i++ {
    		go wait.UntilWithContext(ctx, e.worker, e.workerLoopPeriod)
    	}
    
    	go func() {
    		defer utilruntime.HandleCrash()
    		e.checkLeftoverEndpoints()
    	}()
    
    	<-ctx.Done()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  8. pkg/controller/volume/attachdetach/attach_detach_controller.go

    	if err != nil {
    		logger.Error(err, "Error populating the desired state of world")
    	}
    	go adc.reconciler.Run(ctx)
    	go adc.desiredStateOfWorldPopulator.Run(ctx)
    	go wait.UntilWithContext(ctx, adc.pvcWorker, time.Second)
    	metrics.Register(adc.pvcLister,
    		adc.pvLister,
    		adc.podLister,
    		adc.actualStateOfWorld,
    		adc.desiredStateOfWorld,
    		&adc.volumePluginMgr,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.6K bytes
    - Viewed (0)
  9. pkg/controller/replicaset/replica_set_test.go

    		}
    		close(received)
    		return nil
    	}
    	// Start only the ReplicaSet watcher and the workqueue, send a watch event,
    	// and make sure it hits the sync method.
    	go wait.UntilWithContext(tCtx, manager.worker, 10*time.Millisecond)
    
    	testRSSpec.Name = "foo"
    	fakeWatch.Add(&testRSSpec)
    
    	select {
    	case <-received:
    	case <-time.After(wait.ForeverTestTimeout):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 69.2K bytes
    - Viewed (0)
  10. pkg/controller/cronjob/cronjob_controllerv2.go

    	if !cache.WaitForNamedCacheSync("cronjob", ctx.Done(), jm.jobListerSynced, jm.cronJobListerSynced) {
    		return
    	}
    
    	for i := 0; i < workers; i++ {
    		go wait.UntilWithContext(ctx, jm.worker, time.Second)
    	}
    
    	<-ctx.Done()
    }
    
    func (jm *ControllerV2) worker(ctx context.Context) {
    	for jm.processNextWorkItem(ctx) {
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 29.2K bytes
    - Viewed (0)
Back to top