mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 08:35:10 +00:00
client-go: add retry logic for Watch and Stream
Kubernetes-commit: 607d3819498e64d969407c3d7cbbb8f53d98f0d4
This commit is contained in:
committed by
Kubernetes Publisher
parent
ccac415190
commit
55854fadb1
@@ -43,6 +43,10 @@ func (r IsRetryableErrorFunc) IsErrorRetryable(request *http.Request, err error)
|
||||
return r(request, err)
|
||||
}
|
||||
|
||||
var neverRetryError = IsRetryableErrorFunc(func(_ *http.Request, _ error) bool {
|
||||
return false
|
||||
})
|
||||
|
||||
// WithRetry allows the client to retry a request up to a certain number of times
|
||||
// Note that WithRetry is not safe for concurrent use by multiple
|
||||
// goroutines without additional locking or coordination.
|
||||
|
Reference in New Issue
Block a user