Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for loopConditionUntilContext (0.33 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/wait/loop.go

    limitations under the License.
    */
    
    package wait
    
    import (
    	"context"
    	"time"
    
    	"k8s.io/apimachinery/pkg/util/runtime"
    )
    
    // loopConditionUntilContext executes the provided condition at intervals defined by
    // the provided timer until the provided context is cancelled, the condition returns
    // true, or the condition returns an error. If sliding is true, the period is computed
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 02:47:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go

    // waitFunc creates a channel that receives an item every time a test
    // should be executed and is closed when the last test should be invoked.
    //
    // Deprecated: Will be removed in a future release in favor of
    // loopConditionUntilContext.
    type waitFunc func(done <-chan struct{}) <-chan struct{}
    
    // WithContext converts the WaitFunc to an equivalent WaitWithContextFunc
    func (w waitFunc) WithContext() waitWithContextFunc {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go

    	var attempt int
    	f := ConditionFunc(func() (bool, error) {
    		attempt++
    		return false, expectedError
    	})
    
    	doneCh := make(chan struct{})
    	go func() {
    		defer close(doneCh)
    		if err := loopConditionUntilContext(ctx, timerWithClock(backoff.Timer(), fakeClock), false, true, f.WithContext()); err == nil || err != expectedError {
    			t.Errorf("unexpected error: %v", err)
    		}
    	}()
    
    	for !fakeClock.HasWaiters() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 02:48:08 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  4. 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)
    }
    
    // Concurrent returns a version of this DelayFunc that is safe for use by multiple goroutines that
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/util/wait/poll.go

    // whether the context has been cancelled.
    func PollUntilContextCancel(ctx context.Context, interval time.Duration, immediate bool, condition ConditionWithContextFunc) error {
    	return loopConditionUntilContext(ctx, Backoff{Duration: interval}.Timer(), immediate, false, condition)
    }
    
    // PollUntilContextTimeout will terminate polling after timeout duration by setting a context
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 26 06:13:35 UTC 2023
    - 14K bytes
    - Viewed (0)
Back to top