Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for JitterUntil (0.5 sec)

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

    }
    
    // Until loops until stop channel is closed, running f every period.
    //
    // Until is syntactic sugar on top of JitterUntil with zero jitter factor and
    // with sliding = true (which means the timer for period starts after the f
    // completes).
    func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
    	JitterUntil(f, period, 0.0, true, stopCh)
    }
    
    // UntilWithContext loops until context is done, running f every period.
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go

    func TestJitterUntil(t *testing.T) {
    	ch := make(chan struct{})
    	// if a channel is closed JitterUntil never calls function f
    	// and returns immediately
    	close(ch)
    	JitterUntil(func() {
    		t.Fatal("should not have been invoked")
    	}, 0, 1.0, true, ch)
    
    	ch = make(chan struct{})
    	called := make(chan struct{})
    	go func() {
    		JitterUntil(func() {
    			called <- struct{}{}
    		}, 0, 1.0, true, ch)
    		close(called)
    	}()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  3. pkg/kubelet/certificate/bootstrap/bootstrap.go

    	if err != nil {
    		return fmt.Errorf("couldn't create client: %v", err)
    	}
    
    	ctx, cancel := context.WithTimeout(ctx, deadline)
    	defer cancel()
    
    	var connected bool
    	wait.JitterUntil(func() {
    		if _, err := cli.Get().AbsPath("/healthz").Do(ctx).Raw(); err != nil {
    			klog.InfoS("Failed to connect to apiserver", "err", err)
    			return
    		}
    		cancel()
    		connected = true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 27 08:04:25 UTC 2022
    - 14.2K bytes
    - Viewed (0)
  4. pilot/pkg/leaderelection/k8sleaderelection/leaderelection.go

    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    	succeeded := false
    	desc := le.config.Lock.Describe()
    	klog.Infof("attempting to acquire leader lease %v...", desc)
    	wait.JitterUntil(func() {
    		succeeded = le.tryAcquireOrRenew(ctx)
    		le.maybeReportTransition()
    		if !succeeded {
    			klog.V(4).Infof("failed to acquire lease %v", desc)
    			return
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 24 04:04:42 UTC 2023
    - 16.3K bytes
    - Viewed (0)
Back to top