Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for PollUntilContextCancel (0.62 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/wait/poll.go

    //
    //	deadlineCtx, deadlineCancel := context.WithTimeout(ctx, timeout)
    //	err := PollUntilContextCancel(deadlineCtx, interval, immediate, condition)
    //
    // The deadline context will be cancelled if the Poll succeeds before the timeout, simplifying
    // inline usage. All other behavior is identical to PollUntilContextCancel.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 26 06:13:35 UTC 2023
    - 14K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go

    	if err != nil {
    		return err
    	}
    
    	objectGVK, _, err := p.inferGVK(object)
    	if err != nil {
    		return err
    	}
    
    	switch objectGVK {
    	case p.policyGVK:
    		return wait.PollUntilContextCancel(timeoutCtx, 100*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
    			policies := p.Source.Hooks()
    			for _, policy := range policies {
    				policyMeta, err := meta.Accessor(policy.Policy)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go

    		return
    	}
    
    	// wait until first successfully sync
    	// this blocks apiserver startup so poll with a short interval
    	err := wait.PollUntilContextCancel(ctx, 100*time.Millisecond, true, func(ctx context.Context) (bool, error) {
    		syncErr := c.sync()
    		return syncErr == nil, nil
    	})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. pkg/controller/validatingadmissionpolicystatus/controller_test.go

    				typeChecker,
    			)
    			if err != nil {
    				t.Fatalf("cannot create controller: %v", err)
    			}
    			go informerFactory.Start(ctx.Done())
    			go controller.Run(ctx, 1)
    			err = wait.PollUntilContextCancel(ctx, time.Second, false, func(ctx context.Context) (done bool, err error) {
    				name := policy.Name
    				// wait until the typeChecking is set, which means the type checking
    				// is complete.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/controller/controller.go

    	// the 'runWorker' function then picks up this dummy key and processes the changes.
    	// the goroutine terminates when 'ctx' is canceled.
    	_ = wait.PollUntilContextCancel(
    		ctx,
    		EncryptionConfigFileChangePollDuration,
    		true,
    		func(ctx context.Context) (bool, error) {
    			// add dummy item to the queue to trigger file content processing.
    			d.queue.Add(workqueueKey)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/test/integration/fieldselector_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	t.Run("OpenAPIv3", func(t *testing.T) {
    		var spec *spec3.OpenAPI
    		err = wait.PollUntilContextCancel(ctx, 100*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
    			// wait for the CRD to be published.
    			root := openapi3.NewRoot(discoveryClient.OpenAPIV3())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 06 15:53:03 UTC 2024
    - 27K bytes
    - Viewed (0)
  7. pkg/kubeapiserver/authenticator/config.go

    	if err != nil {
    		return err
    	}
    
    	var lastErr error
    	if waitErr := wait.PollUntilContextCancel(ctx, 10*time.Second, true, func(_ context.Context) (done bool, err error) {
    		lastErr = updatedJWTAuthenticator.healthCheck()
    		return lastErr == nil, nil
    	}); lastErr != nil || waitErr != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  8. pkg/kubelet/logs/container_log_manager_test.go

    	// Keeping the monitor duration smaller in order to keep the unwanted delay in the test to a minimal.
    	go func() {
    		pollTimeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
    		defer cancel()
    		err = wait.PollUntilContextCancel(pollTimeoutCtx, 5*time.Millisecond, false, func(ctx context.Context) (done bool, err error) {
    			return c.queue.Len() == 0, nil
    		})
    		require.NoError(t, err)
    		c.queue.ShutDown()
    	}()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. pkg/scheduler/eventhandlers.go

    // WaitForHandlersSync waits for EventHandlers to sync.
    // It returns true if it was successful, false if the controller should shut down
    func (sched *Scheduler) WaitForHandlersSync(ctx context.Context) error {
    	return wait.PollUntilContextCancel(ctx, syncedPollPeriod, true, func(ctx context.Context) (done bool, err error) {
    		for _, handler := range sched.registeredHandlers {
    			if !handler.HasSynced() {
    				return false, nil
    			}
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:21:04 UTC 2024
    - 24K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go

    			return false, nil
    		}
    		t.m.Lock()
    		defer t.m.Unlock()
    		t.v = v
    		close(sync)
    		return true, nil
    	}
    
    	go func() {
    		_ = wait.PollUntilContextCancel(ctx, 10*time.Second, true, initFn)
    	}()
    
    	if synchronizeTokenIDVerifierForTest {
    		select {
    		case <-sync:
    		case <-ctx.Done():
    		}
    	}
    
    	return t
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 37.9K bytes
    - Viewed (0)
Back to top