mirror of
https://github.com/containers/skopeo.git
synced 2025-09-19 00:46:17 +00:00
Update module github.com/containers/image/v5 to v5.36.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
2
vendor/github.com/hashicorp/go-retryablehttp/.go-version
generated
vendored
2
vendor/github.com/hashicorp/go-retryablehttp/.go-version
generated
vendored
@@ -1 +1 @@
|
||||
1.22.2
|
||||
1.23
|
||||
|
11
vendor/github.com/hashicorp/go-retryablehttp/.golangci.yml
generated
vendored
Normal file
11
vendor/github.com/hashicorp/go-retryablehttp/.golangci.yml
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- errcheck
|
||||
- staticcheck
|
||||
- gosimple
|
||||
- govet
|
||||
output_format: colored-line-number
|
14
vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS
generated
vendored
14
vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS
generated
vendored
@@ -1 +1,13 @@
|
||||
* @hashicorp/go-retryablehttp-maintainers
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
||||
|
||||
# Default owner
|
||||
* @hashicorp/team-ip-compliance @hashicorp/go-retryablehttp-maintainers
|
||||
|
||||
# Add override rules below. Each line is a file/folder pattern followed by one or more owners.
|
||||
# Being an owner means those groups or individuals will be added as reviewers to PRs affecting
|
||||
# those areas of the code.
|
||||
# Examples:
|
||||
# /docs/ @docs-team
|
||||
# *.js @js-team
|
||||
# *.go @go-team
|
||||
|
2
vendor/github.com/hashicorp/go-retryablehttp/Makefile
generated
vendored
2
vendor/github.com/hashicorp/go-retryablehttp/Makefile
generated
vendored
@@ -2,7 +2,7 @@ default: test
|
||||
|
||||
test:
|
||||
go vet ./...
|
||||
go test -v -race ./...
|
||||
go test -v -race ./... -coverprofile=coverage.out
|
||||
|
||||
updatedeps:
|
||||
go get -f -t -u ./...
|
||||
|
19
vendor/github.com/hashicorp/go-retryablehttp/client.go
generated
vendored
19
vendor/github.com/hashicorp/go-retryablehttp/client.go
generated
vendored
@@ -638,6 +638,23 @@ func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Resp
|
||||
return time.Duration(jitterMin * int64(attemptNum))
|
||||
}
|
||||
|
||||
// RateLimitLinearJitterBackoff wraps the retryablehttp.LinearJitterBackoff.
|
||||
// It first checks if the response status code is http.StatusTooManyRequests
|
||||
// (HTTP Code 429) or http.StatusServiceUnavailable (HTTP Code 503). If it is
|
||||
// and the response contains a Retry-After response header, it will wait the
|
||||
// amount of time specified by the header. Otherwise, this calls
|
||||
// LinearJitterBackoff.
|
||||
func RateLimitLinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
|
||||
if resp != nil {
|
||||
if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable {
|
||||
if sleep, ok := parseRetryAfterHeader(resp.Header["Retry-After"]); ok {
|
||||
return sleep
|
||||
}
|
||||
}
|
||||
}
|
||||
return LinearJitterBackoff(min, max, attemptNum, resp)
|
||||
}
|
||||
|
||||
// PassthroughErrorHandler is an ErrorHandler that directly passes through the
|
||||
// values from the net/http library for the final request. The body is not
|
||||
// closed.
|
||||
@@ -870,11 +887,13 @@ func (c *Client) Head(url string) (*http.Response, error) {
|
||||
}
|
||||
|
||||
// Post is a shortcut for doing a POST request without making a new client.
|
||||
// The bodyType parameter sets the "Content-Type" header of the request.
|
||||
func Post(url, bodyType string, body interface{}) (*http.Response, error) {
|
||||
return defaultClient.Post(url, bodyType, body)
|
||||
}
|
||||
|
||||
// Post is a convenience method for doing simple POST requests.
|
||||
// The bodyType parameter sets the "Content-Type" header of the request.
|
||||
func (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) {
|
||||
req, err := NewRequest("POST", url, body)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user