- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ExponentialBackoffWithContext (0.6 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/wait/backoff.go
// In case (1) the returned error is what the condition function returned. // In all other cases, ErrWaitTimeout is returned. // // Since backoffs are often subject to cancellation, we recommend using // ExponentialBackoffWithContext and passing a context to the method. func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { for backoff.Steps > 0 { if ok, err := runConditionWithCrashProtection(condition); err != nil || ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 19:14:11 UTC 2023 - 16.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go
// having a webhook error allows us to track the last actual webhook error for requests that // are later cancelled or time out. var webhookErr error err := wait.ExponentialBackoffWithContext(ctx, retryBackoff, func(_ context.Context) (bool, error) { webhookErr = webhookFn() if shouldRetry(webhookErr) { return false, nil } if webhookErr != nil { return false, webhookErr }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 20 19:02:55 UTC 2023 - 6.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go
} contextFn := test.context if contextFn == nil { contextFn = defaultContext } ctx, cancel := contextFn() defer cancel() attempts := 0 err := ExponentialBackoffWithContext(ctx, backoff, func(_ context.Context) (bool, error) { attempts++ defer func() { if test.cancelContextAfter > 0 && test.cancelContextAfter == attempts { 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) -
CHANGELOG/CHANGELOG-1.27.md
- Callers of `wait.ExponentialBackoffWithContext` now must pass a `ConditionWithContextFunc` to be consistent with the signature and avoid creating a duplicate context. If your condition does not need a context you can use the `ConditionFunc.WithContext()` helper to ignore the context,...
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 23:01:06 UTC 2024 - 455.3K bytes - Viewed (0)