This commit is contained in:
Adrien Delorme 2019-01-24 13:07:27 +01:00
parent e919c2ff44
commit 9099bf8a4a
12 changed files with 104 additions and 68 deletions

2
go.mod
View File

@ -23,7 +23,7 @@ require (
github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78 // indirect
github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 // indirect
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect
github.com/aws/aws-sdk-go v1.16.21
github.com/aws/aws-sdk-go v1.16.24
github.com/bgentry/speakeasy v0.0.0-20150902231413-36e9cfdd6909 // indirect
github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 // indirect

4
go.sum
View File

@ -43,8 +43,8 @@ github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 h1:MBXhrxjNkjdqJysf
github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws/aws-sdk-go v1.16.21 h1:9dSP0kDCz1tPkPVvaJkXW+DvuWiJta/plpAxhbc/tgA=
github.com/aws/aws-sdk-go v1.16.21/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.16.24 h1:I/A3Hwbgs3IEAP6v1bFpHKXiT7wZDoToX9cb00nxZnM=
github.com/aws/aws-sdk-go v1.16.24/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/bgentry/speakeasy v0.0.0-20150902231413-36e9cfdd6909 h1:mUVWHQ4tjVv86uJhxSbYqwdz4o+Imcl6HoZtoaqC3zM=

View File

@ -1,8 +1,8 @@
// +build !go1.9
package aws
import (
"time"
)
import "time"
// Context is an copy of the Go v1.7 stdlib's context.Context interface.
// It is represented as a SDK interface to enable you to use the "WithContext"
@ -35,37 +35,3 @@ type Context interface {
// functions.
Value(key interface{}) interface{}
}
// BackgroundContext returns a context that will never be canceled, has no
// values, and no deadline. This context is used by the SDK to provide
// backwards compatibility with non-context API operations and functionality.
//
// Go 1.6 and before:
// This context function is equivalent to context.Background in the Go stdlib.
//
// Go 1.7 and later:
// The context returned will be the value returned by context.Background()
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
return backgroundCtx
}
// SleepWithContext will wait for the timer duration to expire, or the context
// is canceled. Which ever happens first. If the context is canceled the Context's
// error will be returned.
//
// Expects Context to always return a non-nil error if the Done channel is closed.
func SleepWithContext(ctx Context, dur time.Duration) error {
t := time.NewTimer(dur)
defer t.Stop()
select {
case <-t.C:
break
case <-ctx.Done():
return ctx.Err()
}
return nil
}

View File

@ -1,9 +0,0 @@
// +build go1.7
package aws
import "context"
var (
backgroundCtx = context.Background()
)

11
vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go generated vendored Normal file
View File

@ -0,0 +1,11 @@
// +build go1.9
package aws
import "context"
// Context is an alias of the Go stdlib's context.Context interface.
// It can be used within the SDK's API operation "WithContext" methods.
//
// See https://golang.org/pkg/context on how to use contexts.
type Context = context.Context

View File

@ -39,3 +39,18 @@ func (e *emptyCtx) String() string {
var (
backgroundCtx = new(emptyCtx)
)
// BackgroundContext returns a context that will never be canceled, has no
// values, and no deadline. This context is used by the SDK to provide
// backwards compatibility with non-context API operations and functionality.
//
// Go 1.6 and before:
// This context function is equivalent to context.Background in the Go stdlib.
//
// Go 1.7 and later:
// The context returned will be the value returned by context.Background()
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
return backgroundCtx
}

View File

@ -0,0 +1,20 @@
// +build go1.7
package aws
import "context"
// BackgroundContext returns a context that will never be canceled, has no
// values, and no deadline. This context is used by the SDK to provide
// backwards compatibility with non-context API operations and functionality.
//
// Go 1.6 and before:
// This context function is equivalent to context.Background in the Go stdlib.
//
// Go 1.7 and later:
// The context returned will be the value returned by context.Background()
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
return context.Background()
}

24
vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go generated vendored Normal file
View File

@ -0,0 +1,24 @@
package aws
import (
"time"
)
// SleepWithContext will wait for the timer duration to expire, or the context
// is canceled. Which ever happens first. If the context is canceled the Context's
// error will be returned.
//
// Expects Context to always return a non-nil error if the Done channel is closed.
func SleepWithContext(ctx Context, dur time.Duration) error {
t := time.NewTimer(dur)
defer t.Stop()
select {
case <-t.C:
break
case <-ctx.Done():
return ctx.Err()
}
return nil
}

View File

@ -193,6 +193,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
},
"api.pricing": service{
@ -1994,7 +1995,7 @@ var awsPartition = partition{
},
"route53resolver": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
Protocols: []string{"https"},
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
@ -3108,6 +3109,13 @@ var awscnPartition = partition{
"cn-northwest-1": endpoint{},
},
},
"firehose": service{
Endpoints: endpoints{
"cn-north-1": endpoint{},
"cn-northwest-1": endpoint{},
},
},
"glacier": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@ -3566,6 +3574,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
"firehose": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
"glacier": service{
Endpoints: endpoints{

View File

@ -572,14 +572,20 @@ func shouldRetryCancel(err error) bool {
return false
}
return shouldRetryCancel(err.OrigErr())
case *url.Error:
if strings.Contains(err.Error(), "connection refused") {
// Refused connections should be retried as the service may not yet
// be running on the port. Go TCP dial considers refused
// connections as not temporary.
return true
}
// *url.Error only implements Temporary after golang 1.6 but since
// url.Error only wraps the error:
return shouldRetryCancel(err.Err)
case temporary:
// If the error is temporary, we want to allow continuation of the
// retry process
return err.Temporary()
case *url.Error:
// *url.Error only implements Temporary after golang 1.6 but since
// url.Error only wraps the error:
return shouldRetryCancel(err.Err)
case nil:
// `awserr.Error.OrigErr()` can be nil, meaning there was an error but
// because we don't know the cause, it is marked as retriable. See
@ -587,7 +593,8 @@ func shouldRetryCancel(err error) bool {
return true
default:
switch err.Error() {
case "net/http: request canceled while waiting for connection":
case "net/http: request canceled",
"net/http: request canceled while waiting for connection":
// known 1.5 error case when an http request is cancelled
return false
}

View File

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
const SDKVersion = "1.16.21"
const SDKVersion = "1.16.24"

View File

@ -85154,15 +85154,9 @@ const (
// InstanceTypeR54xlarge is a InstanceType enum value
InstanceTypeR54xlarge = "r5.4xlarge"
// InstanceTypeR58xlarge is a InstanceType enum value
InstanceTypeR58xlarge = "r5.8xlarge"
// InstanceTypeR512xlarge is a InstanceType enum value
InstanceTypeR512xlarge = "r5.12xlarge"
// InstanceTypeR516xlarge is a InstanceType enum value
InstanceTypeR516xlarge = "r5.16xlarge"
// InstanceTypeR524xlarge is a InstanceType enum value
InstanceTypeR524xlarge = "r5.24xlarge"
@ -85199,15 +85193,9 @@ const (
// InstanceTypeR5d4xlarge is a InstanceType enum value
InstanceTypeR5d4xlarge = "r5d.4xlarge"
// InstanceTypeR5d8xlarge is a InstanceType enum value
InstanceTypeR5d8xlarge = "r5d.8xlarge"
// InstanceTypeR5d12xlarge is a InstanceType enum value
InstanceTypeR5d12xlarge = "r5d.12xlarge"
// InstanceTypeR5d16xlarge is a InstanceType enum value
InstanceTypeR5d16xlarge = "r5d.16xlarge"
// InstanceTypeR5d24xlarge is a InstanceType enum value
InstanceTypeR5d24xlarge = "r5d.24xlarge"