Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for JitterUntil (0.16 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/server/stats/volume_stat_calculator.go

    	}
    }
    
    // StartOnce starts pod volume calc that will occur periodically in the background until s.StopOnce is called
    func (s *volumeStatCalculator) StartOnce() *volumeStatCalculator {
    	s.startO.Do(func() {
    		go wait.JitterUntil(func() {
    			s.calcAndStoreStats()
    		}, s.jitterPeriod, 1.0, true, s.stopChannel)
    	})
    	return s
    }
    
    // StopOnce stops background pod volume calculation.  Will not stop a currently executing calculations until
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 29 00:55:10 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go

    	resourceName := e.DefaultQualifiedResource.String()
    	klog.V(2).InfoS("Monitoring resource count at path", "resource", resourceName, "path", "<storage-prefix>/"+prefix)
    	stopCh := make(chan struct{})
    	go wait.JitterUntil(func() {
    		count, err := e.Storage.Count(prefix)
    		if err != nil {
    			klog.V(5).InfoS("Failed to update storage count metric", "err", err)
    			count = -1
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 19 23:22:44 UTC 2024
    - 60.8K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet.go

    		//
    		// Introduce some small jittering to ensure that over time the requests won't start
    		// accumulating at approximately the same time from the set of nodes due to priority and
    		// fairness effect.
    		go wait.JitterUntil(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, 0.04, true, wait.NeverStop)
    		go kl.fastStatusUpdateOnce()
    
    		// start syncing lease
    		go kl.nodeLeaseController.Run(context.Background())
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 126.1K bytes
    - Viewed (0)
Back to top