- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for delayFunc (0.14 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/wait/delay.go
import ( "context" "sync" "time" "k8s.io/utils/clock" ) // DelayFunc returns the next time interval to wait. type DelayFunc func() time.Duration // Timer takes an arbitrary delay function and returns a timer that can handle arbitrary interval changes. // Use Backoff{...}.Timer() for simple delays and more efficient timers. func (fn DelayFunc) Timer(c clock.Clock) Timer { return &variableTimer{fn: fn, new: c.NewTimer} }
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/backoff.go
// zero no backoff will be performed as the same calling DelayFunc with a zero factor // and steps. func (b Backoff) DelayWithReset(c clock.Clock, resetInterval time.Duration) DelayFunc { if b.Factor <= 0 { return b.DelayFunc() } if resetInterval <= 0 { b.Steps = 0 b.Factor = 0 return b.DelayFunc() } return (&backoffManager{ backoff: b, initialBackoff: b, resetInterval: resetInterval,
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/storage/feature/feature_support_checker.go
func (f *defaultFeatureSupportChecker) checkClient(ctx context.Context, c client) { // start with 10 ms, multiply by 2 each step, until 15 s and stays on 15 seconds. delayFunc := wait.Backoff{ Duration: 10 * time.Millisecond, Cap: 15 * time.Second, Factor: 2.0, Steps: 11}.DelayFunc() f.lock.Lock() defer f.lock.Unlock() for _, ep := range c.Endpoints() { if _, found := f.checkingEndpoint[ep]; found { continue }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 11:56:42 UTC 2024 - 6.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 19 02:48:08 UTC 2023 - 15.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/timer.go
close(ch) return noopTimer{closedCh: ch} } func (t noopTimer) C() <-chan time.Time { return t.closedCh } func (noopTimer) Next() {} func (noopTimer) Stop() {} type variableTimer struct { fn DelayFunc t clock.Timer new func(time.Duration) clock.Timer } func (t *variableTimer) C() <-chan time.Time { if t.t == nil { d := t.fn() t.t = t.new(d) } return t.t.C() }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 19:14:11 UTC 2023 - 2.9K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/volumebinding/binder_test.go
t.Fatalf("failed to update PVC %q", getPVCName(scenario.apiPVC)) } } if scenario.delayFunc != nil { go func(scenario scenarioType) { time.Sleep(5 * time.Second) // Sleep a while to run after bindAPIUpdate in BindPodVolumes logger.V(5).Info("Running delay function") scenario.delayFunc(t, ctx, testEnv, pod, scenario.initPVs, scenario.initPVCs) }(scenario) } // Execute
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 09:46:58 UTC 2024 - 82.8K bytes - Viewed (0)