vendor: make vendor-update

This commit is contained in:
Aliaksandr Valialkin 2021-10-18 15:25:11 +03:00
parent a3e09a57c2
commit dea8521ab9
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
14 changed files with 727 additions and 554 deletions

10
go.mod
View file

@ -1,7 +1,7 @@
module github.com/VictoriaMetrics/VictoriaMetrics module github.com/VictoriaMetrics/VictoriaMetrics
require ( require (
cloud.google.com/go/storage v1.18.0 cloud.google.com/go/storage v1.18.1
github.com/VictoriaMetrics/fastcache v1.7.0 github.com/VictoriaMetrics/fastcache v1.7.0
// Do not use the original github.com/valyala/fasthttp because of issues // Do not use the original github.com/valyala/fasthttp because of issues
@ -10,7 +10,7 @@ require (
github.com/VictoriaMetrics/metrics v1.18.0 github.com/VictoriaMetrics/metrics v1.18.0
github.com/VictoriaMetrics/metricsql v0.27.0 github.com/VictoriaMetrics/metricsql v0.27.0
github.com/VividCortex/ewma v1.2.0 // indirect github.com/VividCortex/ewma v1.2.0 // indirect
github.com/aws/aws-sdk-go v1.41.0 github.com/aws/aws-sdk-go v1.41.4
github.com/cespare/xxhash/v2 v2.1.2 github.com/cespare/xxhash/v2 v2.1.2
github.com/cheggaaa/pb/v3 v3.0.8 github.com/cheggaaa/pb/v3 v3.0.8
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
@ -29,11 +29,11 @@ require (
github.com/valyala/fasttemplate v1.2.1 github.com/valyala/fasttemplate v1.2.1
github.com/valyala/gozstd v1.14.1 github.com/valyala/gozstd v1.14.1
github.com/valyala/quicktemplate v1.7.0 github.com/valyala/quicktemplate v1.7.0
golang.org/x/net v0.0.0-20211011170408-caeb26a5c8c0 golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac golang.org/x/sys v0.0.0-20211015200801-69063c4bb744
google.golang.org/api v0.58.0 google.golang.org/api v0.58.0
google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e // indirect google.golang.org/genproto v0.0.0-20211016002631-37fc39342514 // indirect
google.golang.org/grpc v1.41.0 // indirect google.golang.org/grpc v1.41.0 // indirect
gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 v2.4.0
) )

20
go.sum
View file

@ -46,8 +46,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.18.0 h1:HM5Hu/BqgmWbo7pT9KFYGUccwzA8ZWDICJww9m5t9UA= cloud.google.com/go/storage v1.18.1 h1:hfXX1gE2mvuwoS/weBfgH1Vr+efX0uLdxX2ETJ9g1JQ=
cloud.google.com/go/storage v1.18.0/go.mod h1:h0NImijCz/2WHwLh03BvmWdrNe4I/pzUdvUHoxIUroU= cloud.google.com/go/storage v1.18.1/go.mod h1:FPalGc7eWSCKf26f2JwjrZhVibDE6pCDP19d1Pe2lB8=
collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
@ -153,8 +153,8 @@ github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZve
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.41.0 h1:XUzHLFWQVhmFtmKTodnAo5QdooPQfpVfilCxIV3aLoE= github.com/aws/aws-sdk-go v1.41.4 h1:5xRzZp8LfBFfowMPxmoNsxLBZOY/NTH4EeI7q2F5eWE=
github.com/aws/aws-sdk-go v1.41.0/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.41.4/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o=
@ -1155,8 +1155,8 @@ golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211011170408-caeb26a5c8c0 h1:qOfNqBm5gk93LjGZo1MJaKY6Bph39zOKz1Hz2ogHj1w= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY=
golang.org/x/net v0.0.0-20211011170408-caeb26a5c8c0/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1280,8 +1280,8 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw= golang.org/x/sys v0.0.0-20211015200801-69063c4bb744 h1:KzbpndAYEM+4oHRp9JmB2ewj0NHHxO3Z0g7Gus2O1kk=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211015200801-69063c4bb744/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1499,8 +1499,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e h1:B3r2Cb5u7Od6/WGb95VHDMp99VU/fuqPYZb6VM8IozI= google.golang.org/genproto v0.0.0-20211016002631-37fc39342514 h1:Rp1vYDPD4TdkMH5S/bZbopsGCsWhPcrLBUwOVhAQCxM=
google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=

View file

@ -1,5 +1,12 @@
# Changes # Changes
### [1.18.1](https://www.github.com/googleapis/google-cloud-go/compare/storage/v1.18.0...storage/v1.18.1) (2021-10-14)
### Bug Fixes
* **storage:** don't assume auth from a client option ([#4982](https://www.github.com/googleapis/google-cloud-go/issues/4982)) ([e17334d](https://www.github.com/googleapis/google-cloud-go/commit/e17334d1fe7645d89d14ae7148313498b984dfbb))
## [1.18.0](https://www.github.com/googleapis/google-cloud-go/compare/storage/v1.17.0...storage/v1.18.0) (2021-10-11) ## [1.18.0](https://www.github.com/googleapis/google-cloud-go/compare/storage/v1.17.0...storage/v1.18.0) (2021-10-11)

View file

@ -239,6 +239,9 @@ func (b *BucketHandle) newPatchCall(uattrs *BucketAttrsToUpdate) (*raw.BucketsPa
// This method only requires the Method and Expires fields in the specified // This method only requires the Method and Expires fields in the specified
// SignedURLOptions opts to be non-nil. If not provided, it attempts to fill the // SignedURLOptions opts to be non-nil. If not provided, it attempts to fill the
// GoogleAccessID and PrivateKey from the GOOGLE_APPLICATION_CREDENTIALS environment variable. // GoogleAccessID and PrivateKey from the GOOGLE_APPLICATION_CREDENTIALS environment variable.
// If you are authenticating with a custom HTTP client, Service Account based
// auto-detection will be hindered.
//
// If no private key is found, it attempts to use the GoogleAccessID to sign the URL. // If no private key is found, it attempts to use the GoogleAccessID to sign the URL.
// This requires the IAM Service Account Credentials API to be enabled // This requires the IAM Service Account Credentials API to be enabled
// (https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview) // (https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview)
@ -260,7 +263,7 @@ func (b *BucketHandle) SignedURL(object string, opts *SignedURLOptions) (string,
newopts.GoogleAccessID = id newopts.GoogleAccessID = id
} }
if newopts.SignBytes == nil && len(newopts.PrivateKey) == 0 { if newopts.SignBytes == nil && len(newopts.PrivateKey) == 0 {
if len(b.c.creds.JSON) > 0 { if b.c.creds != nil && len(b.c.creds.JSON) > 0 {
var sa struct { var sa struct {
PrivateKey string `json:"private_key"` PrivateKey string `json:"private_key"`
} }
@ -285,7 +288,7 @@ func (b *BucketHandle) SignedURL(object string, opts *SignedURLOptions) (string,
func (b *BucketHandle) detectDefaultGoogleAccessID() (string, error) { func (b *BucketHandle) detectDefaultGoogleAccessID() (string, error) {
returnErr := errors.New("no credentials found on client and not on GCE (Google Compute Engine)") returnErr := errors.New("no credentials found on client and not on GCE (Google Compute Engine)")
if len(b.c.creds.JSON) > 0 { if b.c.creds != nil && len(b.c.creds.JSON) > 0 {
var sa struct { var sa struct {
ClientEmail string `json:"client_email"` ClientEmail string `json:"client_email"`
} }

View file

@ -6,10 +6,10 @@ require (
cloud.google.com/go v0.97.0 cloud.google.com/go v0.97.0
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.6 github.com/google/go-cmp v0.5.6
github.com/googleapis/gax-go/v2 v2.1.0 github.com/googleapis/gax-go/v2 v2.1.1
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/api v0.57.0 google.golang.org/api v0.58.0
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0
google.golang.org/grpc v1.40.0 google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1 google.golang.org/protobuf v1.27.1

View file

@ -144,8 +144,9 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0 h1:6DWmvNpomjL1+3liNSZbVns3zsYzzCjm6pRBO1tLeso=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU=
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@ -270,8 +271,9 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -327,8 +329,9 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365 h1:6wSTsvPddg9gc/mVEEyk9oOAoxn+bT4Z9q1zx+4RwA4=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw=
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -425,8 +428,10 @@ google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNe
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.57.0 h1:4t9zuDlHLcIx0ZEhmXEeFVCRsiOgpgn2QOH9N0MNjPI= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
google.golang.org/api v0.58.0 h1:MDkAbYIB1JpSgCTOCYYoIec/coMlKK4oVbpnBLLcyT0=
google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@ -489,6 +494,8 @@ google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEc
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=

View file

@ -100,7 +100,8 @@ type Client struct {
scheme string scheme string
// ReadHost is the default host used on the reader. // ReadHost is the default host used on the reader.
readHost string readHost string
creds *google.Credentials // May be nil.
creds *google.Credentials
// gc is an optional gRPC-based, GAPIC client. // gc is an optional gRPC-based, GAPIC client.
// //
@ -131,14 +132,13 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
opts = append(opts, internaloption.WithDefaultEndpoint("https://storage.googleapis.com/storage/v1/")) opts = append(opts, internaloption.WithDefaultEndpoint("https://storage.googleapis.com/storage/v1/"))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint("https://storage.mtls.googleapis.com/storage/v1/")) opts = append(opts, internaloption.WithDefaultMTLSEndpoint("https://storage.mtls.googleapis.com/storage/v1/"))
// Don't error out here. The user may have passed in their own HTTP
// client which does not auth with ADC or other common conventions.
c, err := transport.Creds(ctx, opts...) c, err := transport.Creds(ctx, opts...)
if err != nil { if err == nil {
return nil, err creds = c
opts = append(opts, internaloption.WithCredentials(creds))
} }
creds = c
opts = append(opts, internaloption.WithCredentials(creds))
} else { } else {
var hostURL *url.URL var hostURL *url.URL

View file

@ -55,6 +55,7 @@ const (
// AWS ISO (US) partition's regions. // AWS ISO (US) partition's regions.
const ( const (
UsIsoEast1RegionID = "us-iso-east-1" // US ISO East. UsIsoEast1RegionID = "us-iso-east-1" // US ISO East.
UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST.
) )
// AWS ISOB (US) partition's regions. // AWS ISOB (US) partition's regions.
@ -10380,6 +10381,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{}, "us-gov-west-1": endpoint{},
}, },
}, },
"kendra": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
"kinesis": service{ "kinesis": service{
Endpoints: endpoints{ Endpoints: endpoints{
@ -11401,6 +11408,9 @@ var awsisoPartition = partition{
"us-iso-east-1": region{ "us-iso-east-1": region{
Description: "US ISO East", Description: "US ISO East",
}, },
"us-iso-west-1": region{
Description: "US ISO WEST",
},
}, },
Services: services{ Services: services{
"api.ecr": service{ "api.ecr": service{
@ -11412,6 +11422,12 @@ var awsisoPartition = partition{
Region: "us-iso-east-1", Region: "us-iso-east-1",
}, },
}, },
"us-iso-west-1": endpoint{
Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
CredentialScope: credentialScope{
Region: "us-iso-west-1",
},
},
}, },
}, },
"api.sagemaker": service{ "api.sagemaker": service{
@ -11432,6 +11448,7 @@ var awsisoPartition = partition{
}, },
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"autoscaling": service{ "autoscaling": service{
@ -11440,24 +11457,28 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"cloudformation": service{ "cloudformation": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"cloudtrail": service{ "cloudtrail": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"codedeploy": service{ "codedeploy": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"comprehend": service{ "comprehend": service{
@ -11472,6 +11493,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"datapipeline": service{ "datapipeline": service{
@ -11484,6 +11506,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"dms": service{ "dms": service{
@ -11510,24 +11533,28 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"ec2": service{ "ec2": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"ecs": service{ "ecs": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"elasticache": service{ "elasticache": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"elasticfilesystem": service{ "elasticfilesystem": service{
@ -11548,6 +11575,7 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"elasticmapreduce": service{ "elasticmapreduce": service{
@ -11556,6 +11584,7 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"https"}, Protocols: []string{"https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"es": service{ "es": service{
@ -11568,6 +11597,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"firehose": service{ "firehose": service{
@ -11582,6 +11612,7 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"health": service{ "health": service{
@ -11607,6 +11638,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"kms": service{ "kms": service{
@ -11619,12 +11651,14 @@ var awsisoPartition = partition{
}, },
}, },
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"lambda": service{ "lambda": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"license-manager": service{ "license-manager": service{
@ -11637,6 +11671,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"medialive": service{ "medialive": service{
@ -11655,6 +11690,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"outposts": service{ "outposts": service{
@ -11673,12 +11709,14 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"redshift": service{ "redshift": service{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"route53": service{ "route53": service{
@ -11735,6 +11773,7 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"sqs": service{ "sqs": service{
@ -11743,6 +11782,7 @@ var awsisoPartition = partition{
"us-iso-east-1": endpoint{ "us-iso-east-1": endpoint{
Protocols: []string{"http", "https"}, Protocols: []string{"http", "https"},
}, },
"us-iso-west-1": endpoint{},
}, },
}, },
"ssm": service{ "ssm": service{
@ -11755,6 +11795,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"streams.dynamodb": service{ "streams.dynamodb": service{
@ -11774,6 +11815,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"support": service{ "support": service{
@ -11792,6 +11834,7 @@ var awsisoPartition = partition{
Endpoints: endpoints{ Endpoints: endpoints{
"us-iso-east-1": endpoint{}, "us-iso-east-1": endpoint{},
"us-iso-west-1": endpoint{},
}, },
}, },
"transcribe": service{ "transcribe": service{

View file

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

View file

@ -140,25 +140,29 @@ func buildRootHuffmanNode() {
panic("unexpected size") panic("unexpected size")
} }
lazyRootHuffmanNode = newInternalNode() lazyRootHuffmanNode = newInternalNode()
for i, code := range huffmanCodes { // allocate a leaf node for each of the 256 symbols
addDecoderNode(byte(i), code, huffmanCodeLen[i]) leaves := new([256]node)
}
}
func addDecoderNode(sym byte, code uint32, codeLen uint8) { for sym, code := range huffmanCodes {
cur := lazyRootHuffmanNode codeLen := huffmanCodeLen[sym]
for codeLen > 8 {
codeLen -= 8 cur := lazyRootHuffmanNode
i := uint8(code >> codeLen) for codeLen > 8 {
if cur.children[i] == nil { codeLen -= 8
cur.children[i] = newInternalNode() i := uint8(code >> codeLen)
if cur.children[i] == nil {
cur.children[i] = newInternalNode()
}
cur = cur.children[i]
}
shift := 8 - codeLen
start, end := int(uint8(code<<shift)), int(1<<shift)
leaves[sym].sym = byte(sym)
leaves[sym].codeLen = codeLen
for i := start; i < start+end; i++ {
cur.children[i] = &leaves[sym]
} }
cur = cur.children[i]
}
shift := 8 - codeLen
start, end := int(uint8(code<<shift)), int(1<<shift)
for i := start; i < start+end; i++ {
cur.children[i] = &node{sym: sym, codeLen: codeLen}
} }
} }

View file

@ -300,12 +300,17 @@ type ClientConn struct {
// clientStream is the state for a single HTTP/2 stream. One of these // clientStream is the state for a single HTTP/2 stream. One of these
// is created for each Transport.RoundTrip call. // is created for each Transport.RoundTrip call.
type clientStream struct { type clientStream struct {
cc *ClientConn cc *ClientConn
req *http.Request
// Fields of Request that we may access even after the response body is closed.
ctx context.Context
reqCancel <-chan struct{}
trace *httptrace.ClientTrace // or nil trace *httptrace.ClientTrace // or nil
ID uint32 ID uint32
bufPipe pipe // buffered pipe with the flow-controlled response payload bufPipe pipe // buffered pipe with the flow-controlled response payload
requestedGzip bool requestedGzip bool
isHead bool
abortOnce sync.Once abortOnce sync.Once
abort chan struct{} // closed to signal stream should end immediately abort chan struct{} // closed to signal stream should end immediately
@ -322,7 +327,10 @@ type clientStream struct {
inflow flow // guarded by cc.mu inflow flow // guarded by cc.mu
bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read
readErr error // sticky read error; owned by transportResponseBody.Read readErr error // sticky read error; owned by transportResponseBody.Read
stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu
reqBody io.ReadCloser
reqBodyContentLength int64 // -1 means unknown
reqBodyClosed bool // body has been closed; guarded by cc.mu
// owned by writeRequest: // owned by writeRequest:
sentEndStream bool // sent an END_STREAM flag to the peer sentEndStream bool // sent an END_STREAM flag to the peer
@ -362,6 +370,10 @@ func (cs *clientStream) abortStreamLocked(err error) {
cs.abortErr = err cs.abortErr = err
close(cs.abort) close(cs.abort)
}) })
if cs.reqBody != nil && !cs.reqBodyClosed {
cs.reqBody.Close()
cs.reqBodyClosed = true
}
// TODO(dneil): Clean up tests where cs.cc.cond is nil. // TODO(dneil): Clean up tests where cs.cc.cond is nil.
if cs.cc.cond != nil { if cs.cc.cond != nil {
// Wake up writeRequestBody if it is waiting on flow control. // Wake up writeRequestBody if it is waiting on flow control.
@ -369,17 +381,15 @@ func (cs *clientStream) abortStreamLocked(err error) {
} }
} }
func (cs *clientStream) abortRequestBodyWrite(err error) { func (cs *clientStream) abortRequestBodyWrite() {
if err == nil {
panic("nil error")
}
cc := cs.cc cc := cs.cc
cc.mu.Lock() cc.mu.Lock()
if cs.stopReqBody == nil { defer cc.mu.Unlock()
cs.stopReqBody = err if cs.reqBody != nil && !cs.reqBodyClosed {
cs.reqBody.Close()
cs.reqBodyClosed = true
cc.cond.Broadcast() cc.cond.Broadcast()
} }
cc.mu.Unlock()
} }
type stickyErrWriter struct { type stickyErrWriter struct {
@ -1065,15 +1075,19 @@ func (cc *ClientConn) decrStreamReservationsLocked() {
func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
ctx := req.Context() ctx := req.Context()
cs := &clientStream{ cs := &clientStream{
cc: cc, cc: cc,
req: req, ctx: ctx,
trace: httptrace.ContextClientTrace(req.Context()), reqCancel: req.Cancel,
peerClosed: make(chan struct{}), isHead: req.Method == "HEAD",
abort: make(chan struct{}), reqBody: req.Body,
respHeaderRecv: make(chan struct{}), reqBodyContentLength: actualContentLength(req),
donec: make(chan struct{}), trace: httptrace.ContextClientTrace(ctx),
peerClosed: make(chan struct{}),
abort: make(chan struct{}),
respHeaderRecv: make(chan struct{}),
donec: make(chan struct{}),
} }
go cs.doRequest() go cs.doRequest(req)
waitDone := func() error { waitDone := func() error {
select { select {
@ -1081,7 +1095,7 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
return nil return nil
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
case <-req.Cancel: case <-cs.reqCancel:
return errRequestCanceled return errRequestCanceled
} }
} }
@ -1100,7 +1114,7 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
// doesn't, they'll RST_STREAM us soon enough. This is a // doesn't, they'll RST_STREAM us soon enough. This is a
// heuristic to avoid adding knobs to Transport. Hopefully // heuristic to avoid adding knobs to Transport. Hopefully
// we can keep it. // we can keep it.
cs.abortRequestBodyWrite(errStopReqBodyWrite) cs.abortRequestBodyWrite()
} }
res.Request = req res.Request = req
res.TLS = cc.tlsState res.TLS = cc.tlsState
@ -1117,8 +1131,11 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
waitDone() waitDone()
return nil, cs.abortErr return nil, cs.abortErr
case <-ctx.Done(): case <-ctx.Done():
return nil, ctx.Err() err := ctx.Err()
case <-req.Cancel: cs.abortStream(err)
return nil, err
case <-cs.reqCancel:
cs.abortStream(errRequestCanceled)
return nil, errRequestCanceled return nil, errRequestCanceled
} }
} }
@ -1127,8 +1144,8 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
// doRequest runs for the duration of the request lifetime. // doRequest runs for the duration of the request lifetime.
// //
// It sends the request and performs post-request cleanup (closing Request.Body, etc.). // It sends the request and performs post-request cleanup (closing Request.Body, etc.).
func (cs *clientStream) doRequest() { func (cs *clientStream) doRequest(req *http.Request) {
err := cs.writeRequest() err := cs.writeRequest(req)
cs.cleanupWriteRequest(err) cs.cleanupWriteRequest(err)
} }
@ -1139,12 +1156,11 @@ func (cs *clientStream) doRequest() {
// //
// It returns non-nil if the request ends otherwise. // It returns non-nil if the request ends otherwise.
// If the returned error is StreamError, the error Code may be used in resetting the stream. // If the returned error is StreamError, the error Code may be used in resetting the stream.
func (cs *clientStream) writeRequest() (err error) { func (cs *clientStream) writeRequest(req *http.Request) (err error) {
cc := cs.cc cc := cs.cc
req := cs.req ctx := cs.ctx
ctx := req.Context()
if err := checkConnHeaders(cs.req); err != nil { if err := checkConnHeaders(req); err != nil {
return err return err
} }
@ -1156,7 +1172,7 @@ func (cs *clientStream) writeRequest() (err error) {
} }
select { select {
case cc.reqHeaderMu <- struct{}{}: case cc.reqHeaderMu <- struct{}{}:
case <-req.Cancel: case <-cs.reqCancel:
return errRequestCanceled return errRequestCanceled
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
@ -1179,7 +1195,7 @@ func (cs *clientStream) writeRequest() (err error) {
if !cc.t.disableCompression() && if !cc.t.disableCompression() &&
req.Header.Get("Accept-Encoding") == "" && req.Header.Get("Accept-Encoding") == "" &&
req.Header.Get("Range") == "" && req.Header.Get("Range") == "" &&
req.Method != "HEAD" { !cs.isHead {
// Request gzip only, not deflate. Deflate is ambiguous and // Request gzip only, not deflate. Deflate is ambiguous and
// not as universally supported anyway. // not as universally supported anyway.
// See: https://zlib.net/zlib_faq.html#faq39 // See: https://zlib.net/zlib_faq.html#faq39
@ -1198,19 +1214,23 @@ func (cs *clientStream) writeRequest() (err error) {
continueTimeout := cc.t.expectContinueTimeout() continueTimeout := cc.t.expectContinueTimeout()
if continueTimeout != 0 && if continueTimeout != 0 &&
!httpguts.HeaderValuesContainsToken( !httpguts.HeaderValuesContainsToken(
cs.req.Header["Expect"], req.Header["Expect"],
"100-continue") { "100-continue") {
continueTimeout = 0 continueTimeout = 0
cs.on100 = make(chan struct{}, 1) cs.on100 = make(chan struct{}, 1)
} }
err = cs.encodeAndWriteHeaders() // Past this point (where we send request headers), it is possible for
// RoundTrip to return successfully. Since the RoundTrip contract permits
// the caller to "mutate or reuse" the Request after closing the Response's Body,
// we must take care when referencing the Request from here on.
err = cs.encodeAndWriteHeaders(req)
<-cc.reqHeaderMu <-cc.reqHeaderMu
if err != nil { if err != nil {
return err return err
} }
hasBody := actualContentLength(cs.req) != 0 hasBody := cs.reqBodyContentLength != 0
if !hasBody { if !hasBody {
cs.sentEndStream = true cs.sentEndStream = true
} else { } else {
@ -1226,7 +1246,7 @@ func (cs *clientStream) writeRequest() (err error) {
err = cs.abortErr err = cs.abortErr
case <-ctx.Done(): case <-ctx.Done():
err = ctx.Err() err = ctx.Err()
case <-req.Cancel: case <-cs.reqCancel:
err = errRequestCanceled err = errRequestCanceled
} }
timer.Stop() timer.Stop()
@ -1236,7 +1256,7 @@ func (cs *clientStream) writeRequest() (err error) {
} }
} }
if err = cs.writeRequestBody(req.Body); err != nil { if err = cs.writeRequestBody(req); err != nil {
if err != errStopReqBodyWrite { if err != errStopReqBodyWrite {
traceWroteRequest(cs.trace, err) traceWroteRequest(cs.trace, err)
return err return err
@ -1271,16 +1291,15 @@ func (cs *clientStream) writeRequest() (err error) {
return cs.abortErr return cs.abortErr
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
case <-req.Cancel: case <-cs.reqCancel:
return errRequestCanceled return errRequestCanceled
} }
} }
} }
func (cs *clientStream) encodeAndWriteHeaders() error { func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error {
cc := cs.cc cc := cs.cc
req := cs.req ctx := cs.ctx
ctx := req.Context()
cc.wmu.Lock() cc.wmu.Lock()
defer cc.wmu.Unlock() defer cc.wmu.Unlock()
@ -1291,7 +1310,7 @@ func (cs *clientStream) encodeAndWriteHeaders() error {
return cs.abortErr return cs.abortErr
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
case <-req.Cancel: case <-cs.reqCancel:
return errRequestCanceled return errRequestCanceled
default: default:
} }
@ -1301,14 +1320,14 @@ func (cs *clientStream) encodeAndWriteHeaders() error {
// we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
// sent by writeRequestBody below, along with any Trailers, // sent by writeRequestBody below, along with any Trailers,
// again in form HEADERS{1}, CONTINUATION{0,}) // again in form HEADERS{1}, CONTINUATION{0,})
trailers, err := commaSeparatedTrailers(cs.req) trailers, err := commaSeparatedTrailers(req)
if err != nil { if err != nil {
return err return err
} }
hasTrailers := trailers != "" hasTrailers := trailers != ""
contentLen := actualContentLength(cs.req) contentLen := actualContentLength(req)
hasBody := contentLen != 0 hasBody := contentLen != 0
hdrs, err := cc.encodeHeaders(cs.req, cs.requestedGzip, trailers, contentLen) hdrs, err := cc.encodeHeaders(req, cs.requestedGzip, trailers, contentLen)
if err != nil { if err != nil {
return err return err
} }
@ -1327,7 +1346,6 @@ func (cs *clientStream) encodeAndWriteHeaders() error {
// cleanupWriteRequest will send a reset to the peer. // cleanupWriteRequest will send a reset to the peer.
func (cs *clientStream) cleanupWriteRequest(err error) { func (cs *clientStream) cleanupWriteRequest(err error) {
cc := cs.cc cc := cs.cc
req := cs.req
if cs.ID == 0 { if cs.ID == 0 {
// We were canceled before creating the stream, so return our reservation. // We were canceled before creating the stream, so return our reservation.
@ -1338,10 +1356,12 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
// Request.Body is closed by the Transport, // Request.Body is closed by the Transport,
// and in multiple cases: server replies <=299 and >299 // and in multiple cases: server replies <=299 and >299
// while still writing request body // while still writing request body
if req.Body != nil { cc.mu.Lock()
if e := req.Body.Close(); err == nil { bodyClosed := cs.reqBodyClosed
err = e cs.reqBodyClosed = true
} cc.mu.Unlock()
if !bodyClosed && cs.reqBody != nil {
cs.reqBody.Close()
} }
if err != nil && cs.sentEndStream { if err != nil && cs.sentEndStream {
@ -1375,7 +1395,6 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
if cs.ID != 0 { if cs.ID != 0 {
cc.forgetStreamID(cs.ID) cc.forgetStreamID(cs.ID)
} }
close(cs.donec)
cc.wmu.Lock() cc.wmu.Lock()
werr := cc.werr werr := cc.werr
@ -1383,6 +1402,8 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
if werr != nil { if werr != nil {
cc.Close() cc.Close()
} }
close(cs.donec)
} }
// awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams. // awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams.
@ -1456,7 +1477,7 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {
if n > max { if n > max {
n = max n = max
} }
if cl := actualContentLength(cs.req); cl != -1 && cl+1 < n { if cl := cs.reqBodyContentLength; cl != -1 && cl+1 < n {
// Add an extra byte past the declared content-length to // Add an extra byte past the declared content-length to
// give the caller's Request.Body io.Reader a chance to // give the caller's Request.Body io.Reader a chance to
// give us more bytes than they declared, so we can catch it // give us more bytes than they declared, so we can catch it
@ -1471,13 +1492,13 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {
var bufPool sync.Pool // of *[]byte var bufPool sync.Pool // of *[]byte
func (cs *clientStream) writeRequestBody(body io.Reader) (err error) { func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
cc := cs.cc cc := cs.cc
body := cs.reqBody
sentEnd := false // whether we sent the final DATA frame w/ END_STREAM sentEnd := false // whether we sent the final DATA frame w/ END_STREAM
req := cs.req
hasTrailers := req.Trailer != nil hasTrailers := req.Trailer != nil
remainLen := actualContentLength(req) remainLen := cs.reqBodyContentLength
hasContentLen := remainLen != -1 hasContentLen := remainLen != -1
cc.mu.Lock() cc.mu.Lock()
@ -1529,12 +1550,7 @@ func (cs *clientStream) writeRequestBody(body io.Reader) (err error) {
for len(remain) > 0 && err == nil { for len(remain) > 0 && err == nil {
var allowed int32 var allowed int32
allowed, err = cs.awaitFlowControl(len(remain)) allowed, err = cs.awaitFlowControl(len(remain))
switch { if err != nil {
case err == errStopReqBodyWrite:
return err
case err == errStopReqBodyWriteAndCancel:
return err
case err != nil:
return err return err
} }
cc.wmu.Lock() cc.wmu.Lock()
@ -1565,16 +1581,26 @@ func (cs *clientStream) writeRequestBody(body io.Reader) (err error) {
return nil return nil
} }
// Since the RoundTrip contract permits the caller to "mutate or reuse"
// a request after the Response's Body is closed, verify that this hasn't
// happened before accessing the trailers.
cc.mu.Lock()
trailer := req.Trailer
err = cs.abortErr
cc.mu.Unlock()
if err != nil {
return err
}
cc.wmu.Lock() cc.wmu.Lock()
defer cc.wmu.Unlock()
var trls []byte var trls []byte
if hasTrailers { if len(trailer) > 0 {
trls, err = cc.encodeTrailers(req) trls, err = cc.encodeTrailers(trailer)
if err != nil { if err != nil {
cc.wmu.Unlock()
return err return err
} }
} }
defer cc.wmu.Unlock()
// Two ways to send END_STREAM: either with trailers, or // Two ways to send END_STREAM: either with trailers, or
// with an empty DATA frame. // with an empty DATA frame.
@ -1595,23 +1621,22 @@ func (cs *clientStream) writeRequestBody(body io.Reader) (err error) {
// if the stream is dead. // if the stream is dead.
func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) { func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) {
cc := cs.cc cc := cs.cc
req := cs.req ctx := cs.ctx
ctx := req.Context()
cc.mu.Lock() cc.mu.Lock()
defer cc.mu.Unlock() defer cc.mu.Unlock()
for { for {
if cc.closed { if cc.closed {
return 0, errClientConnClosed return 0, errClientConnClosed
} }
if cs.stopReqBody != nil { if cs.reqBodyClosed {
return 0, cs.stopReqBody return 0, errStopReqBodyWrite
} }
select { select {
case <-cs.abort: case <-cs.abort:
return 0, cs.abortErr return 0, cs.abortErr
case <-ctx.Done(): case <-ctx.Done():
return 0, ctx.Err() return 0, ctx.Err()
case <-req.Cancel: case <-cs.reqCancel:
return 0, errRequestCanceled return 0, errRequestCanceled
default: default:
} }
@ -1825,11 +1850,11 @@ func shouldSendReqContentLength(method string, contentLength int64) bool {
} }
// requires cc.wmu be held. // requires cc.wmu be held.
func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) { func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
cc.hbuf.Reset() cc.hbuf.Reset()
hlSize := uint64(0) hlSize := uint64(0)
for k, vv := range req.Trailer { for k, vv := range trailer {
for _, v := range vv { for _, v := range vv {
hf := hpack.HeaderField{Name: k, Value: v} hf := hpack.HeaderField{Name: k, Value: v}
hlSize += uint64(hf.Size()) hlSize += uint64(hf.Size())
@ -1839,7 +1864,7 @@ func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
return nil, errRequestHeaderListSize return nil, errRequestHeaderListSize
} }
for k, vv := range req.Trailer { for k, vv := range trailer {
lowKey, ascii := asciiToLower(k) lowKey, ascii := asciiToLower(k)
if !ascii { if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
@ -1975,7 +2000,13 @@ func (rl *clientConnReadLoop) cleanup() {
} }
cc.closed = true cc.closed = true
for _, cs := range cc.streams { for _, cs := range cc.streams {
cs.abortStreamLocked(err) select {
case <-cs.peerClosed:
// The server closed the stream before closing the conn,
// so no need to interrupt it.
default:
cs.abortStreamLocked(err)
}
} }
cc.cond.Broadcast() cc.cond.Broadcast()
cc.mu.Unlock() cc.mu.Unlock()
@ -2217,28 +2248,33 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
return nil, nil return nil, nil
} }
streamEnded := f.StreamEnded() res.ContentLength = -1
isHead := cs.req.Method == "HEAD" if clens := res.Header["Content-Length"]; len(clens) == 1 {
if !streamEnded || isHead { if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil {
res.ContentLength = -1 res.ContentLength = int64(cl)
if clens := res.Header["Content-Length"]; len(clens) == 1 { } else {
if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil {
res.ContentLength = int64(cl)
} else {
// TODO: care? unlike http/1, it won't mess up our framing, so it's
// more safe smuggling-wise to ignore.
}
} else if len(clens) > 1 {
// TODO: care? unlike http/1, it won't mess up our framing, so it's // TODO: care? unlike http/1, it won't mess up our framing, so it's
// more safe smuggling-wise to ignore. // more safe smuggling-wise to ignore.
} }
} else if len(clens) > 1 {
// TODO: care? unlike http/1, it won't mess up our framing, so it's
// more safe smuggling-wise to ignore.
} }
if streamEnded || isHead { if cs.isHead {
res.Body = noBody res.Body = noBody
return res, nil return res, nil
} }
if f.StreamEnded() {
if res.ContentLength > 0 {
res.Body = missingBody{}
} else {
res.Body = noBody
}
return res, nil
}
cs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength}) cs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength})
cs.bytesRemain = res.ContentLength cs.bytesRemain = res.ContentLength
res.Body = transportResponseBody{cs} res.Body = transportResponseBody{cs}
@ -2282,8 +2318,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr
} }
// transportResponseBody is the concrete type of Transport.RoundTrip's // transportResponseBody is the concrete type of Transport.RoundTrip's
// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body. // Response.Body. It is an io.ReadCloser.
// On Close it sends RST_STREAM if EOF wasn't already seen.
type transportResponseBody struct { type transportResponseBody struct {
cs *clientStream cs *clientStream
} }
@ -2366,6 +2401,8 @@ func (b transportResponseBody) Close() error {
} }
cc.mu.Unlock() cc.mu.Unlock()
// TODO(dneil): Acquiring this mutex can block indefinitely.
// Move flow control return to a goroutine?
cc.wmu.Lock() cc.wmu.Lock()
// Return connection-level flow control. // Return connection-level flow control.
if unread > 0 { if unread > 0 {
@ -2380,9 +2417,9 @@ func (b transportResponseBody) Close() error {
select { select {
case <-cs.donec: case <-cs.donec:
case <-cs.req.Context().Done(): case <-cs.ctx.Done():
return cs.req.Context().Err() return cs.ctx.Err()
case <-cs.req.Cancel: case <-cs.reqCancel:
return errRequestCanceled return errRequestCanceled
} }
return nil return nil
@ -2436,7 +2473,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
return nil return nil
} }
if f.Length > 0 { if f.Length > 0 {
if cs.req.Method == "HEAD" && len(data) > 0 { if cs.isHead && len(data) > 0 {
cc.logf("protocol error: received DATA on a HEAD request") cc.logf("protocol error: received DATA on a HEAD request")
rl.endStreamError(cs, StreamError{ rl.endStreamError(cs, StreamError{
StreamID: f.StreamID, StreamID: f.StreamID,
@ -2786,6 +2823,11 @@ func (t *Transport) logf(format string, args ...interface{}) {
var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil)) var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil))
type missingBody struct{}
func (missingBody) Close() error { return nil }
func (missingBody) Read([]byte) (int, error) { return 0, io.ErrUnexpectedEOF }
func strSliceContains(ss []string, s string) bool { func strSliceContains(ss []string, s string) bool {
for _, v := range ss { for _, v := range ss {
if v == s { if v == s {

View file

@ -66,9 +66,21 @@ var signals = [...]string{
} }
const ( const (
FILE_LIST_DIRECTORY = 0x00000001 FILE_READ_DATA = 0x00000001
FILE_APPEND_DATA = 0x00000004 FILE_READ_ATTRIBUTES = 0x00000080
FILE_READ_EA = 0x00000008
FILE_WRITE_DATA = 0x00000002
FILE_WRITE_ATTRIBUTES = 0x00000100 FILE_WRITE_ATTRIBUTES = 0x00000100
FILE_WRITE_EA = 0x00000010
FILE_APPEND_DATA = 0x00000004
FILE_EXECUTE = 0x00000020
FILE_GENERIC_READ = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE
FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE
FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE
FILE_LIST_DIRECTORY = 0x00000001
FILE_TRAVERSE = 0x00000020
FILE_SHARE_READ = 0x00000001 FILE_SHARE_READ = 0x00000001
FILE_SHARE_WRITE = 0x00000002 FILE_SHARE_WRITE = 0x00000002
@ -1789,7 +1801,53 @@ type reparseDataBuffer struct {
} }
const ( const (
FSCTL_GET_REPARSE_POINT = 0x900A8 FSCTL_CREATE_OR_GET_OBJECT_ID = 0x0900C0
FSCTL_DELETE_OBJECT_ID = 0x0900A0
FSCTL_DELETE_REPARSE_POINT = 0x0900AC
FSCTL_DUPLICATE_EXTENTS_TO_FILE = 0x098344
FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = 0x0983E8
FSCTL_FILESYSTEM_GET_STATISTICS = 0x090060
FSCTL_FILE_LEVEL_TRIM = 0x098208
FSCTL_FIND_FILES_BY_SID = 0x09008F
FSCTL_GET_COMPRESSION = 0x09003C
FSCTL_GET_INTEGRITY_INFORMATION = 0x09027C
FSCTL_GET_NTFS_VOLUME_DATA = 0x090064
FSCTL_GET_REFS_VOLUME_DATA = 0x0902D8
FSCTL_GET_OBJECT_ID = 0x09009C
FSCTL_GET_REPARSE_POINT = 0x0900A8
FSCTL_GET_RETRIEVAL_POINTER_COUNT = 0x09042B
FSCTL_GET_RETRIEVAL_POINTERS = 0x090073
FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3
FSCTL_IS_PATHNAME_VALID = 0x09002C
FSCTL_LMR_SET_LINK_TRACKING_INFORMATION = 0x1400EC
FSCTL_MARK_HANDLE = 0x0900FC
FSCTL_OFFLOAD_READ = 0x094264
FSCTL_OFFLOAD_WRITE = 0x098268
FSCTL_PIPE_PEEK = 0x11400C
FSCTL_PIPE_TRANSCEIVE = 0x11C017
FSCTL_PIPE_WAIT = 0x110018
FSCTL_QUERY_ALLOCATED_RANGES = 0x0940CF
FSCTL_QUERY_FAT_BPB = 0x090058
FSCTL_QUERY_FILE_REGIONS = 0x090284
FSCTL_QUERY_ON_DISK_VOLUME_INFO = 0x09013C
FSCTL_QUERY_SPARING_INFO = 0x090138
FSCTL_READ_FILE_USN_DATA = 0x0900EB
FSCTL_RECALL_FILE = 0x090117
FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = 0x090440
FSCTL_SET_COMPRESSION = 0x09C040
FSCTL_SET_DEFECT_MANAGEMENT = 0x098134
FSCTL_SET_ENCRYPTION = 0x0900D7
FSCTL_SET_INTEGRITY_INFORMATION = 0x09C280
FSCTL_SET_INTEGRITY_INFORMATION_EX = 0x090380
FSCTL_SET_OBJECT_ID = 0x090098
FSCTL_SET_OBJECT_ID_EXTENDED = 0x0900BC
FSCTL_SET_REPARSE_POINT = 0x0900A4
FSCTL_SET_SPARSE = 0x0900C4
FSCTL_SET_ZERO_DATA = 0x0980C8
FSCTL_SET_ZERO_ON_DEALLOCATION = 0x090194
FSCTL_SIS_COPYFILE = 0x090100
FSCTL_WRITE_USN_CLOSE_RECORD = 0x0900EF
MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024 MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024
IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003 IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
IO_REPARSE_TAG_SYMLINK = 0xA000000C IO_REPARSE_TAG_SYMLINK = 0xA000000C

File diff suppressed because it is too large Load diff

10
vendor/modules.txt vendored
View file

@ -6,7 +6,7 @@ cloud.google.com/go/internal
cloud.google.com/go/internal/optional cloud.google.com/go/internal/optional
cloud.google.com/go/internal/trace cloud.google.com/go/internal/trace
cloud.google.com/go/internal/version cloud.google.com/go/internal/version
# cloud.google.com/go/storage v1.18.0 # cloud.google.com/go/storage v1.18.1
## explicit ## explicit
cloud.google.com/go/storage cloud.google.com/go/storage
cloud.google.com/go/storage/internal/apiv2 cloud.google.com/go/storage/internal/apiv2
@ -28,7 +28,7 @@ github.com/VictoriaMetrics/metricsql/binaryop
# github.com/VividCortex/ewma v1.2.0 # github.com/VividCortex/ewma v1.2.0
## explicit ## explicit
github.com/VividCortex/ewma github.com/VividCortex/ewma
# github.com/aws/aws-sdk-go v1.41.0 # github.com/aws/aws-sdk-go v1.41.4
## explicit ## explicit
github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/arn
@ -236,7 +236,7 @@ go.opencensus.io/trace/propagation
go.opencensus.io/trace/tracestate go.opencensus.io/trace/tracestate
# go.uber.org/atomic v1.9.0 # go.uber.org/atomic v1.9.0
go.uber.org/atomic go.uber.org/atomic
# golang.org/x/net v0.0.0-20211011170408-caeb26a5c8c0 # golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
## explicit ## explicit
golang.org/x/net/context golang.org/x/net/context
golang.org/x/net/context/ctxhttp golang.org/x/net/context/ctxhttp
@ -260,7 +260,7 @@ golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt golang.org/x/oauth2/jwt
# golang.org/x/sync v0.0.0-20210220032951-036812b2e83c # golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync/errgroup golang.org/x/sync/errgroup
# golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac # golang.org/x/sys v0.0.0-20211015200801-69063c4bb744
## explicit ## explicit
golang.org/x/sys/internal/unsafeheader golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix golang.org/x/sys/unix
@ -305,7 +305,7 @@ google.golang.org/appengine/internal/socket
google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/socket google.golang.org/appengine/socket
google.golang.org/appengine/urlfetch google.golang.org/appengine/urlfetch
# google.golang.org/genproto v0.0.0-20211011165927-a5fb3255271e # google.golang.org/genproto v0.0.0-20211016002631-37fc39342514
## explicit ## explicit
google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/iam/v1 google.golang.org/genproto/googleapis/iam/v1