Until wraps the watcherClient's watch function with RetryWatcher making sure that watcher gets restarted in case of errors. The initialResourceVersion will be given to watch method when first called. It shall not be "" or "0" given the underlying WATCH call issues (#74022). If you want the initial l
(ctx context.Context, initialResourceVersion string, watcherClient cache.Watcher, conditions ...ConditionFunc)
| 106 | // those items. In normal code you should care about being level driven so you'd not care about not seeing all the edges.) |
| 107 | // The most frequent usage for Until would be a test where you want to verify exact order of events ("edges"). |
| 108 | func Until(ctx context.Context, initialResourceVersion string, watcherClient cache.Watcher, conditions ...ConditionFunc) (*watch.Event, error) { |
| 109 | w, err := NewRetryWatcher(initialResourceVersion, watcherClient) |
| 110 | if err != nil { |
| 111 | return nil, err |
| 112 | } |
| 113 | |
| 114 | return UntilWithoutRetry(ctx, w, conditions...) |
| 115 | } |
| 116 | |
| 117 | // UntilWithSync creates an informer from lw, optionally checks precondition when the store is synced, |
| 118 | // and watches the output until each provided condition succeeds, in a way that is identical |
no test coverage detected