Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for loopConditionUntilContext (0.16 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/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)
Back to top