- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for ConditionWithContextFunc (0.35 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go
type ConditionFunc func() (done bool, err error) // ConditionWithContextFunc returns true if the condition is satisfied, or an error // if the loop should be aborted. // // The caller passes along a context that can be used by the condition function. type ConditionWithContextFunc func(context.Context) (done bool, err error) // WithContext converts a ConditionFunc into a ConditionWithContextFunc
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 19:14:11 UTC 2023 - 7.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 41.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/poll.go
// function should be invoked periodically and whether it is bound by a timeout. // condition: user specified ConditionWithContextFunc function. // // Deprecated: will be removed in favor of loopConditionUntilContext. func poll(ctx context.Context, immediate bool, wait waitWithContextFunc, condition ConditionWithContextFunc) error { if immediate { done, err := runConditionWithCrashProtectionWithContext(ctx, condition) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 26 06:13:35 UTC 2023 - 14K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/delay.go
// offers all of the functionality of the methods in this package. func (fn DelayFunc) Until(ctx context.Context, immediate, sliding bool, condition ConditionWithContextFunc) error { return loopConditionUntilContext(ctx, &variableTimer{fn: fn, new: internalClock.NewTimer}, immediate, sliding, condition) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 19:14:11 UTC 2023 - 1.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/loop.go
// context error if the context was terminated. // // This is the common loop construct for all polling in the wait package. func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding bool, condition ConditionWithContextFunc) error { defer t.Stop() var timeCh <-chan time.Time doneCh := ctx.Done() if !sliding { timeCh = t.C() } // if immediate is true the condition is
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 19 02:47:00 UTC 2023 - 2.8K bytes - Viewed (0) -
pkg/kubelet/volumemanager/volume_manager.go
} // verifyVolumesMountedFunc returns a method that returns true when all expected // volumes are mounted. func (vm *volumeManager) verifyVolumesMountedFunc(podName types.UniquePodName, expectedVolumes []string) wait.ConditionWithContextFunc { return func(_ context.Context) (done bool, err error) { if errs := vm.desiredStateOfWorld.PopPodErrors(podName); len(errs) > 0 { return true, errors.New(strings.Join(errs, "; ")) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 21.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/backoff.go
// If an error is returned by the condition the backoff stops immediately. The condition will // never be invoked more than backoff.Steps times. func ExponentialBackoffWithContext(ctx context.Context, backoff Backoff, condition ConditionWithContextFunc) error { for backoff.Steps > 0 { select { case <-ctx.Done(): return ctx.Err() default: } if ok, err := runConditionWithCrashProtectionWithContext(ctx, 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) -
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, or use `ExponentialBackoff` directly. ([#1...
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 23:01:06 UTC 2024 - 455.3K bytes - Viewed (0)