MCPcopy
hub / github.com/kubernetes/client-go / NewRetryWatcher

Function NewRetryWatcher

tools/watch/retrywatcher.go:62–64  ·  view source on GitHub ↗

NewRetryWatcher creates a new RetryWatcher. It will make sure that watches gets restarted in case of recoverable errors. The initialResourceVersion will be given to watch method when first called.

(initialResourceVersion string, watcherClient cache.Watcher)

Source from the content-addressed store, hash-verified

60// It will make sure that watches gets restarted in case of recoverable errors.
61// The initialResourceVersion will be given to watch method when first called.
62func NewRetryWatcher(initialResourceVersion string, watcherClient cache.Watcher) (*RetryWatcher, error) {
63 return newRetryWatcher(initialResourceVersion, watcherClient, 1*time.Second)
64}
65
66func newRetryWatcher(initialResourceVersion string, watcherClient cache.Watcher, minRestartDelay time.Duration) (*RetryWatcher, error) {
67 switch initialResourceVersion {

Callers 3

UntilFunction · 0.85
TestNewRetryWatcherFunction · 0.85

Calls 1

newRetryWatcherFunction · 0.85

Tested by 2

TestNewRetryWatcherFunction · 0.68