mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 00:24:59 +00:00
client-go: add test to document retry conditions
Kubernetes-commit: 68c542d52246b0b750e332616884350164018695
This commit is contained in:
committed by
Kubernetes Publisher
parent
adb1f506f9
commit
79c4b4060a
@@ -346,8 +346,12 @@ func retryAfterResponse() *http.Response {
|
||||
}
|
||||
|
||||
func retryAfterResponseWithDelay(delay string) *http.Response {
|
||||
return retryAfterResponseWithCodeAndDelay(http.StatusInternalServerError, delay)
|
||||
}
|
||||
|
||||
func retryAfterResponseWithCodeAndDelay(code int, delay string) *http.Response {
|
||||
return &http.Response{
|
||||
StatusCode: http.StatusInternalServerError,
|
||||
StatusCode: code,
|
||||
Header: http.Header{"Retry-After": []string{delay}},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user