Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for NewExponentialBackOff (0.48 sec)

  1. pkg/backoff/exponential_test.go

    	var (
    		testInitialInterval = 500 * time.Millisecond
    		testMaxInterval     = 5 * time.Second
    	)
    
    	o := DefaultOption()
    	o.InitialInterval = testInitialInterval
    	o.MaxInterval = testMaxInterval
    	exp := NewExponentialBackOff(o)
    	exp.(ExponentialBackOff).exponentialBackOff.Multiplier = 2
    
    	expectedResults := []time.Duration{500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000}
    	for i, d := range expectedResults {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 05 16:03:30 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  2. pkg/backoff/exponential.go

    		InitialInterval: defaultInitialInterval,
    		MaxInterval:     defaultMaxInterval,
    	}
    }
    
    // NewExponentialBackOff creates an istio wrapped ExponentialBackOff.
    // By default, it never stops.
    func NewExponentialBackOff(o Option) BackOff {
    	b := ExponentialBackOff{}
    	b.exponentialBackOff = backoff.NewExponentialBackOff()
    	b.exponentialBackOff.InitialInterval = o.InitialInterval
    	b.exponentialBackOff.MaxInterval = o.MaxInterval
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 25 01:53:48 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultFileLockManager.java

                                FileLockOutcome lockOutcome;
                                try {
                                    lockOutcome = lockInformationRegion(LockMode.Exclusive, newExponentialBackoff(shortTimeoutMs));
                                } catch (InterruptedException e) {
                                    throw throwAsUncheckedException(e);
                                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:32 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  4. pkg/wasm/httpfetcher.go

    	c := f.client
    	if allowInsecure {
    		c = f.insecureClient
    	}
    	attempts := 0
    	o := backoff.DefaultOption()
    	o.InitialInterval = f.initialBackoff
    	b := backoff.NewExponentialBackOff(o)
    	var lastError error
    	for attempts < f.requestMaxRetry {
    		attempts++
    		req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 14 20:23:34 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  5. security/pkg/nodeagent/cache/secretcache.go

    	// TODO(ramaraochavali): Think about tieing these failures to liveness probe with a
    	// reasonable threshold (when the problem is not transient) and restart the pod.
    	go func() {
    		b := backoff.NewExponentialBackOff(backoff.DefaultOption())
    		_ = b.RetryWithContext(context.TODO(), func() error {
    			err := sc.tryAddFileWatcher(file, resourceName)
    			return err
    		})
    	}()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 04 08:29:46 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/multicluster.go

    func (m *Multicluster) checkShouldLead(client kubelib.Client, systemNamespace string, stop <-chan struct{}) bool {
    	var res bool
    	if features.ExternalIstiod {
    		b := backoff.NewExponentialBackOff(backoff.DefaultOption())
    		ctx, cancel := context.WithCancel(context.Background())
    		go func() {
    			select {
    			case <-stop:
    				cancel()
    			case <-ctx.Done():
    			}
    		}()
    		defer cancel()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  7. security/pkg/nodeagent/sds/sdsservice.go

    	// server in these cases.
    	go func() {
    		// TODO: do we need max timeout for retry, seems meaningless to retry forever if it never succeed
    		b := backoff.NewExponentialBackOff(backoff.DefaultOption())
    		// context for both timeout and channel, whichever stops first, the context will be done
    		ctx, cancel := context.WithCancel(context.Background())
    		go func() {
    			select {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat May 25 00:20:04 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. security/pkg/pki/ca/ca.go

    			enableJitter:       enableJitter,
    			client:             client,
    		},
    	}
    
    	// always use ``istio-ca-secret` in priority, otherwise fall back to `cacerts`
    	var caCertName string
    	b := backoff.NewExponentialBackOff(backoff.DefaultOption())
    	err = b.RetryWithContext(ctx, func() error {
    		caCertName = CASecret
    		// 1. fetch `istio-ca-secret` in priority
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  9. pkg/istio-agent/agent.go

    // TODO: Fix this method with unused return value
    // nolint: unparam
    func (a *Agent) getWorkloadCerts(st *cache.SecretManagerClient) (sk *security.SecretItem, err error) {
    	b := backoff.NewExponentialBackOff(backoff.DefaultOption())
    	// This will loop forever until success
    	err = b.RetryWithContext(context.TODO(), func() error {
    		sk, err = st.GenerateSecret(security.WorkloadKeyCertResourceName)
    		if err == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 05 10:02:56 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  10. pkg/adsc/adsc.go

    		if ok && len(ips) > 0 {
    			config.IP = ips[0]
    		}
    	}
    	if config.Workload == "" {
    		config.Workload = "test-1"
    	}
    	if config.BackoffPolicy == nil {
    		config.BackoffPolicy = backoff.NewExponentialBackOff(backoff.DefaultOption())
    	}
    	return *config
    }
    
    // Dial connects to a ADS server, with optional MTLS authentication if a cert dir is specified.
    func (a *ADSC) Dial() error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 05 22:18:49 UTC 2024
    - 35K bytes
    - Viewed (0)
Back to top