Fix bug with log disabling (#1959)
Prior to this change, Kaniko disabled logging for its ecr-login dependency by redirecting the logger's output to ioutil.Discard. However, since that used the logrus standard logger, this had the effect of completely disabling (redirecting to Discard) _all_ logging done by Kaniko. This caused integratiion test failures, and left any user of Kaniko without any logging. This fix updates the dependency on ecr-login to include a fix for this issue, and updates to the new API introduced in that fix.
This commit is contained in:
parent
cfe7c92eef
commit
f067edae9f
32
go.mod
32
go.mod
|
|
@ -13,8 +13,8 @@ replace (
|
|||
require (
|
||||
cloud.google.com/go/storage v1.21.0
|
||||
github.com/Azure/azure-storage-blob-go v0.14.0
|
||||
github.com/aws/aws-sdk-go v1.43.7
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220216180153-3d7835abdf40
|
||||
github.com/aws/aws-sdk-go v1.42.52
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220228164355-396b2034c795
|
||||
github.com/chrismellard/docker-credential-acr-env v0.0.0-20220119192733-fe33c00cee21
|
||||
github.com/containerd/cgroups v1.0.3 // indirect
|
||||
github.com/docker/docker v20.10.12+incompatible
|
||||
|
|
@ -62,19 +62,19 @@ require (
|
|||
github.com/Microsoft/hcsshim v0.9.2 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect
|
||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.13.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.13.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.8.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.10.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.2.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.14.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.11.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.7.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.9.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.14.0 // indirect
|
||||
github.com/aws/smithy-go v1.10.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.14.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.14.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.9.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.11.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.3.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.15.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.12.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.8.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.10.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.15.0 // indirect
|
||||
github.com/aws/smithy-go v1.11.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/cilium/ebpf v0.8.0 // indirect
|
||||
|
|
@ -138,7 +138,7 @@ require (
|
|||
github.com/xanzy/ssh-agent v0.3.1 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
|
|
|
|||
63
go.sum
63
go.sum
|
|
@ -275,47 +275,47 @@ github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
|
|||
github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
|
||||
github.com/aws/aws-sdk-go v1.43.7 h1:Gbs53KxXJWbO3txoVkevf56bhdDFqRisl7MQQ6581vc=
|
||||
github.com/aws/aws-sdk-go v1.43.7/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
|
||||
github.com/aws/aws-sdk-go v1.42.52 h1:/+TZ46+0qu9Ph/UwjVrU3SG8OBi87uJLrLiYRNZKbHQ=
|
||||
github.com/aws/aws-sdk-go v1.42.52/go.mod h1:OGr6lGMAKGlG9CVrYnWYDKIyb829c6EVBRjxqjmPepc=
|
||||
github.com/aws/aws-sdk-go-v2 v1.7.1/go.mod h1:L5LuPC1ZgDr2xQS7AmIec/Jlc7O/Y1u2KxJyNVab250=
|
||||
github.com/aws/aws-sdk-go-v2 v1.13.0 h1:1XIXAfxsEmbhbj5ry3D3vX+6ZcUYvIqSm4CWWEuGZCA=
|
||||
github.com/aws/aws-sdk-go-v2 v1.13.0/go.mod h1:L6+ZpqHaLbAaxsqV0L4cvxZY7QupWJB4fhkf8LXvC7w=
|
||||
github.com/aws/aws-sdk-go-v2 v1.14.0 h1:IzSYBJHu0ZdUi27kIW6xVrs0eSxI4AzwbenzfXhhVs4=
|
||||
github.com/aws/aws-sdk-go-v2 v1.14.0/go.mod h1:ZA3Y8V0LrlWj63MQAnRHgKf/5QB//LSZCPNWlWrNGLU=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.5.0/go.mod h1:RWlPOAW3E3tbtNAqTwvSW54Of/yP3oiZXMI0xfUdjyA=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.13.1 h1:yLv8bfNoT4r+UvUKQKqRtdnvuWGMK5a82l4ru9Jvnuo=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.13.1/go.mod h1:Ba5Z4yL/UGbjQUzsiaN378YobhFo0MLfueXGiOsYtEs=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.14.0 h1:Yr8/7R6H8nqqfqgLATrcB83ax6FE2HcDXEB54XPhE98=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.14.0/go.mod h1:GKDRrvsq/PTaOYc9252u8Uah1hsIdtor4oIrFvUNPNM=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.3.1/go.mod h1:r0n73xwsIVagq8RsxmZbGSRQFj9As3je72C2WzUIToc=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.8.0 h1:8Ow0WcyDesGNL0No11jcgb1JAtE+WtubqXjgxau+S0o=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.8.0/go.mod h1:gnMo58Vwx3Mu7hj1wpcG8DI0s57c9o42UQ6wgTQT5to=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.9.0 h1:R3Q5s1uGLUg0aUzi+oRaUqRXhd17G/9+PiVnAwXp4sY=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.9.0/go.mod h1:PyHKqk/+tJuDY7T8R580S1j/AcSD+ODeUZ99CAUKLqQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.3.0/go.mod h1:2LAuqPx1I6jNfaGDucWfA2zqQCYCOMCDHiCOciALyNw=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.10.0 h1:NITDuUZO34mqtOwFWZiXo7yAHj7kf+XPE+EiKuCBNUI=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.10.0/go.mod h1:I6/fHT/fH460v09eg2gVrd8B/IqskhNdpcLH0WNO3QI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.4 h1:CRiQJ4E2RhfDdqbie1ZYDo8QtIo75Mk7oTdJSfwJTMQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.4/go.mod h1:XHgQ7Hz2WY2GAn//UXHofLfPXWh+s62MbMOijrg12Lw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.2.0 h1:3ADoioDMOtF4uiK59vCpplpCwugEU+v4ZFD29jDL3RQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.2.0/go.mod h1:BsCSJHx5DnDXIrOcqB8KN1/B+hXLG/bi4Y6Vjcx/x9E=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.11.0 h1:CkM4d3lNeMXMZ0BDX3BtCktnKA1Ftud84Hb6d+Ix4Rk=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.11.0/go.mod h1:rwdUKJV5rm+vHu1ncD1iGDqahBEL8O0tBjVqo9eO2N0=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.5 h1:+phazLmKkjBYhFTsGYH9J7jgnA8+Aer2yE4QeS4zn6A=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.5/go.mod h1:2hXc8ooJqF2nAznsbJQIn+7h851/bu8GVC80OVTTqf8=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.3.0 h1:PO+HNeJBeRK0yVD9CQZ+VUrYfd5sXqS7YdPYHHcDkR4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.3.0/go.mod h1:miRSv9l093jX/t/j+mBCaLqFHo9xKYzJ7DGm1BsGoJM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.1.1/go.mod h1:Zy8smImhTdOETZqfyn01iNOe0CNggVbPjCajyaz6Gvg=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.5 h1:ixotxbfTCFpqbuwFv/RcZwyzhkxPSYDYEMcj4niB5Uk=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.5/go.mod h1:R3sWUqPcfXSiF/LSFJhjyJmpg9uV6yP2yv3YZZjldVI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.6 h1:c8s9EhIPVFMFS+R1+rtEghGrf7v83gSUWbcCYX/OPes=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.6/go.mod h1:o1ippSg3yJx5EuT4AOGXJCUcmt5vrcxla1cg6K1Q8Iw=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.4.1/go.mod h1:FglZcyeiBqcbvyinl+n14aT/EWC7S1MIH+Gan2iizt0=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.14.0 h1:AAZJJAENsQ4yYbnfvqPZT8Nc1YlEd5CZ4usymlC2b4U=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.14.0/go.mod h1:a3WUi3JjM3MFtIYenSYPJ7UZPXsw7U7vzebnynxucks=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.15.0 h1:lY2Z2sBP+zSbJ6CvvmnFgPcgknoQ0OJV88AwVetRRFk=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecr v1.15.0/go.mod h1:4zYI85WiYDhFaU1jPFVfkD7HlBcdnITDE3QxDwy4Kus=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.4.1/go.mod h1:eD5Eo4drVP2FLTw0G+SMIPWNWvQRGGTtIZR2XeAagoA=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.11.0 h1:axOp0EcAVRrF7F8d9gqApgT/9RjN34aR+cuW5LTgROo=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.11.0/go.mod h1:iurUYk+aG+E2DO0MnQEZKh9zsaIxuTcrvCaAUTUhuTU=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.12.0 h1:LsqBpyRofMG6eDs6YGud6FhdGyIyXelAasPOZ6wWLro=
|
||||
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.12.0/go.mod h1:IArQ3IBR00FkuraKwudKZZU32OxJfdTdwV+W5iZh3Y4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.1/go.mod h1:zceowr5Z1Nh2WVP8bf/3ikB41IZW59E4yIYbg+pC6mw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.7.0 h1:4QAOB3KrvI1ApJK14sliGr3Ie2pjyvNypn/lfzDHfUw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.7.0/go.mod h1:K/qPe6AP2TGYv4l6n7c88zh9jWBDf6nHhvg1fx/EWfU=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.8.0 h1:JNMALY8/ZnFsfAzBHtC4gq8JeZPANmIoI2VaBgYzbf8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.8.0/go.mod h1:rBDLgXDAwHOfxZKLRDl8OGTPzFDC+a2pLqNNj8+QwfI=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.3.1/go.mod h1:J3A3RGUvuCZjvSuZEcOpHDnzZP/sKbhDWV2T1EOzFIM=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.9.0 h1:1qLJeQGBmNQW3mBNzK2CFmrQNmoXWrscPqsrAaU1aTA=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.9.0/go.mod h1:vCV4glupK3tR7pw7ks7Y4jYRL86VvxS+g5qk04YeWrU=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.10.0 h1:qCuSRiQhsPU46NH79HUyPQEn5AcpMj+2gsqMYwtzdw8=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.10.0/go.mod h1:m1CRRFX7eH3EE6w0ntdu+lo+Ph9VS7y8qRV/vdym0ZY=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.6.0/go.mod h1:q7o0j7d7HrJk/vr9uUt3BVRASvcU7gYZB9PUgPiByXg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.14.0 h1:ksiDXhvNYg0D2/UFkLejsaz3LqpW5yjNQ8Nx9Sn2c0E=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.14.0/go.mod h1:u0xMJKDvvfocRjiozsoZglVNXRG19043xzp3r2ivLIk=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.15.0 h1:zC/vHxWTlqZ0tIPJItg0zWHsa25cH7tXsUknSGcH39o=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.15.0/go.mod h1:E264g2Gl5U9KTGzmd8ypGEAoh75VmqyuA/Ox5O1eRE4=
|
||||
github.com/aws/smithy-go v1.6.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
|
||||
github.com/aws/smithy-go v1.10.0 h1:gsoZQMNHnX+PaghNw4ynPsyGP7aUCqx5sY2dlPQsZ0w=
|
||||
github.com/aws/smithy-go v1.10.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220216180153-3d7835abdf40 h1:skzbn0VkQsUGOtr8M0A2xSjZsnLvq/FaFUOd81FUu9A=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220216180153-3d7835abdf40/go.mod h1:8vJsEZ4iRqG+Vx6pKhWK6U00qcj0KC37IsfszMkY6UE=
|
||||
github.com/aws/smithy-go v1.11.0 h1:nOfSDwiiH232f90OuevPnAEQO5ZqH+xnn8uGVsvBCw4=
|
||||
github.com/aws/smithy-go v1.11.0/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220228164355-396b2034c795 h1:IWeCJzU+IYaO2rVEBlGPTBfe90cmGXFTLdhUFlzDGsY=
|
||||
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220228164355-396b2034c795/go.mod h1:8vJsEZ4iRqG+Vx6pKhWK6U00qcj0KC37IsfszMkY6UE=
|
||||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
|
||||
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
|
||||
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
|
|
@ -2083,8 +2083,9 @@ golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/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-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ func GetKeychain() authn.Keychain {
|
|||
return authn.NewMultiKeychain(
|
||||
authn.DefaultKeychain,
|
||||
google.Keychain,
|
||||
authn.NewKeychainFromHelper(ecr.NewECRHelper(ecr.WithLogOutput(ioutil.Discard))),
|
||||
authn.NewKeychainFromHelper(ecr.NewECRHelper(ecr.WithLogger(ioutil.Discard))),
|
||||
authn.NewKeychainFromHelper(credhelper.NewACRCredentialsHelper()),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,698 @@
|
|||
# Release (2022-02-24)
|
||||
|
||||
## General Highlights
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Bug Fix**: Fixes the AWS Sigv4 signer to trim header value's whitespace when computing the canonical headers block of the string to sign.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/aws-sdk-go-v2`: v1.14.0
|
||||
* **Feature**: Add new AdaptiveMode retryer to aws/retry package. This new retryer uses dynamic token bucketing with client ratelimiting when throttle responses are received.
|
||||
* **Feature**: Adds new interface aws.RetryerV2, replacing aws.Retryer and deprecating the GetInitialToken method in favor of GetAttemptToken so Context can be provided. The SDK will use aws.RetryerV2 internally. Wrapping aws.Retryers as aws.RetryerV2 automatically.
|
||||
* `github.com/aws/aws-sdk-go-v2/config`: [v1.14.0](config/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options.
|
||||
* **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589)
|
||||
* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.9.0](credentials/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575)
|
||||
* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.7.0](feature/dynamodb/attributevalue/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
|
||||
* **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
|
||||
* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.4.0](feature/dynamodb/expression/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: Add support for expression names with dots via new NameBuilder function NameNoDotSplit, related to [aws/aws-sdk-go#2570](https://github.com/aws/aws-sdk-go/issues/2570)
|
||||
* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.7.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
|
||||
* **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
|
||||
* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.14.0](service/accessanalyzer/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.5.0](service/account/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.13.0](service/acm/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.15.0](service/acmpca/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/alexaforbusiness`: [v1.13.0](service/alexaforbusiness/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.13.0](service/amp/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.10.0](service/amplify/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.11.0](service/amplifybackend/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.4.0](service/amplifyuibuilder/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.14.0](service/apigateway/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.9.0](service/apigatewaymanagementapi/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.11.0](service/apigatewayv2/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.11.0](service/appconfig/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appconfigdata`: [v1.3.0](service/appconfigdata/CHANGELOG.md#v130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.13.0](service/appflow/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.12.0](service/appintegrations/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.14.0](service/applicationautoscaling/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.8.0](service/applicationcostprofiler/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/applicationdiscoveryservice`: [v1.11.0](service/applicationdiscoveryservice/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.14.0](service/applicationinsights/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.12.0](service/appmesh/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.10.0](service/apprunner/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.14.0](service/appstream/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.13.0](service/appsync/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.13.0](service/athena/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.16.0](service/auditmanager/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.20.0](service/autoscaling/CHANGELOG.md#v1200-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.11.0](service/autoscalingplans/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.14.0](service/backup/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.4.0](service/backupgateway/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.15.0](service/batch/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.14.0](service/braket/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/budgets`: [v1.11.0](service/budgets/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.18.0](service/chime/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.8.0](service/chimesdkidentity/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.6.0](service/chimesdkmeetings/CHANGELOG.md#v160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.8.0](service/chimesdkmessaging/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.15.0](service/cloud9/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.7.0](service/cloudcontrol/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.11.0](service/clouddirectory/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.19.0](service/cloudformation/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.15.0](service/cloudfront/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudhsm`: [v1.11.0](service/cloudhsm/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudhsmv2`: [v1.12.0](service/cloudhsmv2/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.12.0](service/cloudsearch/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudsearchdomain`: [v1.10.0](service/cloudsearchdomain/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.14.0](service/cloudtrail/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.16.0](service/cloudwatch/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.13.0](service/cloudwatchevents/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.14.0](service/cloudwatchlogs/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.11.0](service/codeartifact/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.18.0](service/codebuild/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.12.0](service/codecommit/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.13.0](service/codedeploy/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.11.0](service/codeguruprofiler/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.14.0](service/codegurureviewer/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codepipeline`: [v1.12.0](service/codepipeline/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codestar`: [v1.10.0](service/codestar/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codestarconnections`: [v1.12.0](service/codestarconnections/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.10.0](service/codestarnotifications/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.12.0](service/cognitoidentity/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.13.0](service/cognitoidentityprovider/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cognitosync`: [v1.10.0](service/cognitosync/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.15.0](service/comprehend/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.12.0](service/comprehendmedical/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.16.0](service/computeoptimizer/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.17.0](service/configservice/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.18.0](service/connect/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.11.0](service/connectcontactlens/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.10.0](service/connectparticipant/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/costandusagereportservice`: [v1.12.0](service/costandusagereportservice/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.16.0](service/costexplorer/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.16.0](service/customerprofiles/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.17.0](service/databasemigrationservice/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.17.0](service/databrew/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.13.0](service/dataexchange/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/datapipeline`: [v1.12.0](service/datapipeline/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.13.0](service/datasync/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.10.0](service/dax/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.14.0](service/detective/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.12.0](service/devicefarm/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.15.0](service/devopsguru/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.16.0](service/directconnect/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.12.0](service/directoryservice/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.10.0](service/dlm/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.16.0](service/docdb/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.4.0](service/drs/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.14.0](service/dynamodb/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.12.0](service/dynamodbstreams/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.13.0](service/ebs/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.30.0](service/ec2/CHANGELOG.md#v1300-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.12.0](service/ec2instanceconnect/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.15.0](service/ecr/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.12.0](service/ecrpublic/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.17.0](service/ecs/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.15.0](service/efs/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.19.0](service/eks/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.19.0](service/elasticache/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.13.0](service/elasticbeanstalk/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticinference`: [v1.10.0](service/elasticinference/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.13.0](service/elasticloadbalancing/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.17.0](service/elasticloadbalancingv2/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.14.0](service/elasticsearchservice/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/elastictranscoder`: [v1.12.0](service/elastictranscoder/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.16.0](service/emr/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.12.0](service/emrcontainers/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.14.0](service/eventbridge/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.5.0](service/evidently/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.7.0](service/finspace/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.9.0](service/finspacedata/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.13.0](service/firehose/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.11.0](service/fis/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.14.0](service/fms/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.18.0](service/forecast/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.10.0](service/forecastquery/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* **Bug Fix**: Fixed an issue that resulted in the wrong service endpoints being constructed.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.18.0](service/frauddetector/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.19.0](service/fsx/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.13.0](service/gamelift/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.12.0](service/glacier/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/globalaccelerator`: [v1.12.0](service/globalaccelerator/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.20.0](service/glue/CHANGELOG.md#v1200-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.6.0](service/grafana/CHANGELOG.md#v160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.12.0](service/greengrass/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.14.0](service/greengrassv2/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.12.0](service/groundstation/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.12.0](service/guardduty/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.14.0](service/health/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.13.0](service/healthlake/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.11.0](service/honeycode/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.17.0](service/iam/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.13.0](service/identitystore/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.18.0](service/imagebuilder/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/inspector`: [v1.11.0](service/inspector/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.5.0](service/inspector2/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.0.0](service/internal/checksum/CHANGELOG.md#v100-2022-02-24)
|
||||
* **Release**: New module for computing checksums
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.22.0](service/iot/CHANGELOG.md#v1220-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.9.0](service/iot1clickdevicesservice/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iot1clickprojects`: [v1.10.0](service/iot1clickprojects/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.11.0](service/iotanalytics/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.10.0](service/iotdataplane/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.13.0](service/iotdeviceadvisor/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.13.0](service/iotevents/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.10.0](service/ioteventsdata/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.11.0](service/iotfleethub/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.10.0](service/iotjobsdataplane/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.11.0](service/iotsecuretunneling/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.19.0](service/iotsitewise/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotthingsgraph`: [v1.11.0](service/iotthingsgraph/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.4.0](service/iottwinmaker/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.17.0](service/iotwireless/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.15.0](service/ivs/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.16.0](service/kafka/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.7.0](service/kafkaconnect/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.21.0](service/kendra/CHANGELOG.md#v1210-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.14.0](service/kinesis/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.12.0](service/kinesisanalytics/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.13.0](service/kinesisanalyticsv2/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisvideo`: [v1.10.0](service/kinesisvideo/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia`: [v1.11.0](service/kinesisvideoarchivedmedia/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia`: [v1.9.0](service/kinesisvideomedia/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kinesisvideosignaling`: [v1.9.0](service/kinesisvideosignaling/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.15.0](service/kms/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.14.0](service/lakeformation/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.18.0](service/lambda/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.15.0](service/lexmodelbuildingservice/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.18.0](service/lexmodelsv2/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lexruntimeservice`: [v1.11.0](service/lexruntimeservice/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.13.0](service/lexruntimev2/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.14.0](service/licensemanager/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.16.0](service/lightsail/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.14.0](service/location/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.11.0](service/lookoutequipment/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.10.0](service/lookoutmetrics/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.11.0](service/lookoutvision/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/machinelearning`: [v1.13.0](service/machinelearning/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.13.0](service/macie/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.19.0](service/macie2/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.11.0](service/managedblockchain/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/marketplacecatalog`: [v1.11.0](service/marketplacecatalog/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/marketplacecommerceanalytics`: [v1.10.0](service/marketplacecommerceanalytics/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/marketplaceentitlementservice`: [v1.10.0](service/marketplaceentitlementservice/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/marketplacemetering`: [v1.12.0](service/marketplacemetering/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.14.0](service/mediaconnect/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.20.0](service/mediaconvert/CHANGELOG.md#v1200-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.18.0](service/medialive/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.14.0](service/mediapackage/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.15.0](service/mediapackagevod/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediastore`: [v1.11.0](service/mediastore/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediastoredata`: [v1.11.0](service/mediastoredata/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.15.0](service/mediatailor/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.8.0](service/memorydb/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.12.0](service/mgn/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/migrationhub`: [v1.11.0](service/migrationhub/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/migrationhubconfig`: [v1.11.0](service/migrationhubconfig/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.4.0](service/migrationhubrefactorspaces/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy`: [v1.4.0](service/migrationhubstrategy/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mobile`: [v1.10.0](service/mobile/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.11.0](service/mq/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mturk`: [v1.12.0](service/mturk/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.11.0](service/mwaa/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.15.0](service/neptune/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.14.0](service/networkfirewall/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.11.0](service/networkmanager/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.11.0](service/nimble/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.8.0](service/opensearch/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/opsworks`: [v1.12.0](service/opsworks/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.13.0](service/opsworkscm/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.13.0](service/organizations/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.16.0](service/outposts/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.5.0](service/panorama/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.16.0](service/personalize/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/personalizeevents`: [v1.10.0](service/personalizeevents/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.10.0](service/personalizeruntime/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.13.0](service/pi/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.15.0](service/pinpoint/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/pinpointemail`: [v1.10.0](service/pinpointemail/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.9.0](service/pinpointsmsvoice/CHANGELOG.md#v190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.12.0](service/polly/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.13.0](service/pricing/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.11.0](service/proton/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.13.0](service/qldb/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.12.0](service/qldbsession/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.19.0](service/quicksight/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.15.0](service/ram/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.5.0](service/rbin/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.17.0](service/rds/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/rdsdata`: [v1.10.0](service/rdsdata/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.20.0](service/redshift/CHANGELOG.md#v1200-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.14.0](service/redshiftdata/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.16.0](service/rekognition/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.4.0](service/resiliencehub/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.11.0](service/resourcegroups/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.12.0](service/resourcegroupstaggingapi/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.15.0](service/robomaker/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.18.0](service/route53/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53domains`: [v1.11.0](service/route53domains/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.7.0](service/route53recoverycluster/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.8.0](service/route53recoverycontrolconfig/CHANGELOG.md#v180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.7.0](service/route53recoveryreadiness/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.14.0](service/route53resolver/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.5.0](service/rum/CHANGELOG.md#v150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.25.0](service/s3/CHANGELOG.md#v1250-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.19.0](service/s3control/CHANGELOG.md#v1190-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.11.0](service/s3outposts/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.25.0](service/sagemaker/CHANGELOG.md#v1250-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.11.0](service/sagemakera2iruntime/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemakeredge`: [v1.10.0](service/sagemakeredge/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.10.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.14.0](service/sagemakerruntime/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/savingsplans`: [v1.10.0](service/savingsplans/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.13.0](service/schemas/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.14.0](service/secretsmanager/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.18.0](service/securityhub/CHANGELOG.md#v1180-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository`: [v1.10.0](service/serverlessapplicationrepository/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.12.0](service/servicecatalog/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.11.0](service/servicecatalogappregistry/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.16.0](service/servicediscovery/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/servicequotas`: [v1.12.0](service/servicequotas/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.13.0](service/ses/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.12.0](service/sesv2/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.12.0](service/sfn/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.15.0](service/shield/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.12.0](service/signer/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.11.0](service/sms/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.14.0](service/snowball/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.7.0](service/snowdevicemanagement/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.16.0](service/sns/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.17.0](service/sqs/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.21.0](service/ssm/CHANGELOG.md#v1210-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.12.0](service/ssmcontacts/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.11.0](service/ssmincidents/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.10.0](service/sso/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.13.0](service/ssoadmin/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.11.0](service/ssooidc/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.15.0](service/storagegateway/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.15.0](service/sts/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.12.0](service/support/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.12.0](service/swf/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.13.0](service/synthetics/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.13.0](service/textract/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.12.0](service/timestreamquery/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.12.0](service/timestreamwrite/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.16.0](service/transcribe/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.4.0](service/transcribestreaming/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.16.0](service/transfer/CHANGELOG.md#v1160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.12.0](service/translate/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.7.0](service/voiceid/CHANGELOG.md#v170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.10.0](service/waf/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.11.0](service/wafregional/CHANGELOG.md#v1110-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.17.0](service/wafv2/CHANGELOG.md#v1170-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.13.0](service/wellarchitected/CHANGELOG.md#v1130-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.6.0](service/wisdom/CHANGELOG.md#v160-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/workdocs`: [v1.10.0](service/workdocs/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/worklink`: [v1.10.0](service/worklink/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.14.0](service/workmail/CHANGELOG.md#v1140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/workmailmessageflow`: [v1.10.0](service/workmailmessageflow/CHANGELOG.md#v1100-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.15.0](service/workspaces/CHANGELOG.md#v1150-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.4.0](service/workspacesweb/CHANGELOG.md#v140-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.12.0](service/xray/CHANGELOG.md#v1120-2022-02-24)
|
||||
* **Feature**: API client updated
|
||||
|
||||
# Release (2022-01-28)
|
||||
|
||||
## General Highlights
|
||||
* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
|
||||
* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/aws-sdk-go-v2/config`: [v1.13.1](config/CHANGELOG.md#v1131-2022-01-28)
|
||||
* **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR.
|
||||
* **Bug Fix**: Updates `config` module to use os.UserHomeDir instead of hard coded environment variable for OS. [#1563](https://github.com/aws/aws-sdk-go-v2/pull/1563)
|
||||
* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.13.0](service/applicationinsights/CHANGELOG.md#v1130-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.13.1](service/cloudtrail/CHANGELOG.md#v1131-2022-01-28)
|
||||
* **Documentation**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.13.1](service/codegurureviewer/CHANGELOG.md#v1131-2022-01-28)
|
||||
* **Documentation**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.16.0](service/configservice/CHANGELOG.md#v1160-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.17.0](service/connect/CHANGELOG.md#v1170-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.12.1](service/ebs/CHANGELOG.md#v1121-2022-01-28)
|
||||
* **Documentation**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.29.0](service/ec2/CHANGELOG.md#v1290-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.11.0](service/ec2instanceconnect/CHANGELOG.md#v1110-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.14.0](service/efs/CHANGELOG.md#v1140-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.10.0](service/fis/CHANGELOG.md#v1100-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.17.0](service/frauddetector/CHANGELOG.md#v1170-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.18.0](service/fsx/CHANGELOG.md#v1180-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.11.0](service/greengrass/CHANGELOG.md#v1110-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.13.0](service/greengrassv2/CHANGELOG.md#v1130-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.11.0](service/guardduty/CHANGELOG.md#v1110-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.10.0](service/honeycode/CHANGELOG.md#v1100-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.14.0](service/ivs/CHANGELOG.md#v1140-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.15.0](service/kafka/CHANGELOG.md#v1150-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.13.0](service/location/CHANGELOG.md#v1130-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.9.0](service/lookoutmetrics/CHANGELOG.md#v190-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.18.0](service/macie2/CHANGELOG.md#v1180-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.19.0](service/mediaconvert/CHANGELOG.md#v1190-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.14.0](service/mediatailor/CHANGELOG.md#v1140-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.14.0](service/ram/CHANGELOG.md#v1140-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.6.1](service/route53recoveryreadiness/CHANGELOG.md#v161-2022-01-28)
|
||||
* **Documentation**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.24.0](service/sagemaker/CHANGELOG.md#v1240-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.17.0](service/securityhub/CHANGELOG.md#v1170-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.14.0](service/storagegateway/CHANGELOG.md#v1140-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.15.0](service/transcribe/CHANGELOG.md#v1150-2022-01-28)
|
||||
* **Feature**: Updated to latest API model.
|
||||
|
||||
# Release (2022-01-14)
|
||||
|
||||
## General Highlights
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# Lint rules to ignore
|
||||
LINTIGNORESINGLEFIGHT='internal/sync/singleflight/singleflight.go:.+error should be the last type'
|
||||
LINT_IGNORE_S3MANAGER_INPUT='feature/s3/manager/upload.go:.+struct field SSEKMSKeyId should be SSEKMSKeyID'
|
||||
|
||||
UNIT_TEST_TAGS=
|
||||
BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest"
|
||||
|
|
@ -72,13 +73,13 @@ all: generate unit
|
|||
###################
|
||||
.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
|
||||
gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy gen-aws-ptrs tidy-modules-% \
|
||||
add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-endpoint-prefix.json \
|
||||
add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-internal-codegen \
|
||||
sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
|
||||
update-module-metadata download-modules-%
|
||||
|
||||
generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
|
||||
gen-config-asserts copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. tidy-modules-. \
|
||||
add-module-license-files gen-aws-ptrs format
|
||||
gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. \
|
||||
tidy-modules-. add-module-license-files gen-aws-ptrs format
|
||||
|
||||
smithy-generate:
|
||||
cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
|
||||
|
|
@ -116,6 +117,11 @@ gen-config-asserts:
|
|||
&& go mod tidy \
|
||||
&& go generate
|
||||
|
||||
gen-internal-codegen:
|
||||
@echo "Generating internal/codegen"
|
||||
cd internal/codegen \
|
||||
&& go generate
|
||||
|
||||
gen-repo-mod-replace:
|
||||
@echo "Generating go.mod replace for repo modules"
|
||||
go run ${REPOTOOLS_CMD_MAKE_RELATIVE}
|
||||
|
|
@ -158,7 +164,7 @@ add-module-license-files:
|
|||
|
||||
sync-models: sync-endpoints-model sync-api-models
|
||||
|
||||
sync-endpoints-model: sync-endpoints.json gen-endpoint-prefix.json
|
||||
sync-endpoints-model: sync-endpoints.json
|
||||
|
||||
sync-endpoints.json:
|
||||
[[ ! -z "${ENDPOINTS_MODEL}" ]] && cp ${ENDPOINTS_MODEL} ${ENDPOINTS_JSON} || echo "ENDPOINTS_MODEL not set, must not be empty"
|
||||
|
|
@ -167,12 +173,6 @@ clone-v1-models:
|
|||
rm -rf /tmp/aws-sdk-go-model-sync
|
||||
git clone https://github.com/aws/aws-sdk-go.git --depth 1 /tmp/aws-sdk-go-model-sync
|
||||
|
||||
gen-endpoint-prefix.json: clone-v1-models
|
||||
cd internal/repotools/cmd/endpointPrefix && \
|
||||
go run . \
|
||||
-m '/tmp/aws-sdk-go-model-sync/models/apis/*/*/api-2.json' \
|
||||
-o ${ENDPOINT_PREFIX_JSON}
|
||||
|
||||
sync-api-models:
|
||||
cd internal/repotools/cmd/syncAPIModels && \
|
||||
go run . \
|
||||
|
|
@ -448,6 +448,7 @@ lint:
|
|||
@echo "go lint SDK and vendor packages"
|
||||
@lint=`golint ./...`; \
|
||||
dolint=`echo "$$lint" | grep -E -v \
|
||||
-e ${LINT_IGNORE_S3MANAGER_INPUT} \
|
||||
-e ${LINTIGNORESINGLEFIGHT}`; \
|
||||
echo "$$dolint"; \
|
||||
if [ "$$dolint" != "" ]; then exit 1; fi
|
||||
|
|
|
|||
|
|
@ -38,31 +38,52 @@ type Config struct {
|
|||
// will prevent the SDK from modifying the HTTP client.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
// An endpoint resolver that can be used to provide or override an endpoint for the given
|
||||
// service and region.
|
||||
// An endpoint resolver that can be used to provide or override an endpoint
|
||||
// for the given service and region.
|
||||
//
|
||||
// See the `aws.EndpointResolver` documentation for additional usage information.
|
||||
// See the `aws.EndpointResolver` documentation for additional usage
|
||||
// information.
|
||||
//
|
||||
// Deprecated: See Config.EndpointResolverWithOptions
|
||||
EndpointResolver EndpointResolver
|
||||
|
||||
// An endpoint resolver that can be used to provide or override an endpoint for the given
|
||||
// service and region.
|
||||
// An endpoint resolver that can be used to provide or override an endpoint
|
||||
// for the given service and region.
|
||||
//
|
||||
// When EndpointResolverWithOptions is specified, it will be used by a service client rather than using
|
||||
// EndpointResolver if also specified.
|
||||
// When EndpointResolverWithOptions is specified, it will be used by a
|
||||
// service client rather than using EndpointResolver if also specified.
|
||||
//
|
||||
// See the `aws.EndpointResolverWithOptions` documentation for additional usage information.
|
||||
// See the `aws.EndpointResolverWithOptions` documentation for additional
|
||||
// usage information.
|
||||
EndpointResolverWithOptions EndpointResolverWithOptions
|
||||
|
||||
// Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be
|
||||
// retried in case of recoverable failures. When nil the API client will use a default
|
||||
// retryer.
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client
|
||||
// will call an operation that fails with a retryable error.
|
||||
//
|
||||
// In general, the provider function should return a new instance of a Retryer if you are attempting
|
||||
// to provide a consistent Retryer configuration across all clients. This will ensure that each client will be
|
||||
// provided a new instance of the Retryer implementation, and will avoid issues such as sharing the same retry token
|
||||
// bucket across services.
|
||||
// API Clients will only use this value to construct a retryer if the
|
||||
// Config.Retryer member is not nil. This value will be ignored if
|
||||
// Retryer is not nil.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry model the API client will be created with.
|
||||
//
|
||||
// API Clients will only use this value to construct a retryer if the
|
||||
// Config.Retryer member is not nil. This value will be ignored if
|
||||
// Retryer is not nil.
|
||||
RetryMode RetryMode
|
||||
|
||||
// Retryer is a function that provides a Retryer implementation. A Retryer
|
||||
// guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer.
|
||||
//
|
||||
// In general, the provider function should return a new instance of a
|
||||
// Retryer if you are attempting to provide a consistent Retryer
|
||||
// configuration across all clients. This will ensure that each client will
|
||||
// be provided a new instance of the Retryer implementation, and will avoid
|
||||
// issues such as sharing the same retry token bucket across services.
|
||||
//
|
||||
// If not nil, RetryMaxAttempts, and RetryMode will be ignored by API
|
||||
// clients.
|
||||
Retryer func() Retryer
|
||||
|
||||
// ConfigSources are the sources that were used to construct the Config.
|
||||
|
|
@ -78,22 +99,25 @@ type Config struct {
|
|||
// standard error.
|
||||
Logger logging.Logger
|
||||
|
||||
// Configures the events that will be sent to the configured logger.
|
||||
// This can be used to configure the logging of signing, retries, request, and responses
|
||||
// of the SDK clients.
|
||||
// Configures the events that will be sent to the configured logger. This
|
||||
// can be used to configure the logging of signing, retries, request, and
|
||||
// responses of the SDK clients.
|
||||
//
|
||||
// See the ClientLogMode type documentation for the complete set of logging modes and available
|
||||
// configuration.
|
||||
// See the ClientLogMode type documentation for the complete set of logging
|
||||
// modes and available configuration.
|
||||
ClientLogMode ClientLogMode
|
||||
|
||||
// The configured DefaultsMode. If not specified, service clients will default to legacy.
|
||||
// The configured DefaultsMode. If not specified, service clients will
|
||||
// default to legacy.
|
||||
//
|
||||
// Supported modes are: auto, cross-region, in-region, legacy, mobile, standard
|
||||
// Supported modes are: auto, cross-region, in-region, legacy, mobile,
|
||||
// standard
|
||||
DefaultsMode DefaultsMode
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set to
|
||||
// AutoDefaultsMode and is initialized by `config.LoadDefaultConfig`. You should not
|
||||
// populate this structure programmatically, or rely on the values here within your applications.
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode
|
||||
// is set to DefaultsModeAuto and is initialized by
|
||||
// `config.LoadDefaultConfig`. You should not populate this structure
|
||||
// programmatically, or rely on the values here within your applications.
|
||||
RuntimeEnvironment RuntimeEnvironment
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ var getGOOS = func() string {
|
|||
}
|
||||
|
||||
// ResolveDefaultsModeAuto is used to determine the effective aws.DefaultsMode when the mode
|
||||
// is set to aws.AutoDefaultsMode.
|
||||
// is set to aws.DefaultsModeAuto.
|
||||
func ResolveDefaultsModeAuto(region string, environment aws.RuntimeEnvironment) aws.DefaultsMode {
|
||||
goos := getGOOS()
|
||||
if goos == "android" || goos == "ios" {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
package defaults
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
)
|
||||
|
||||
// Configuration is the set of SDK configuration options that are determined based
|
||||
// on the configured DefaultsMode.
|
||||
type Configuration struct {
|
||||
// RetryMode is the configuration's default retry mode API clients should
|
||||
// use for constructing a Retryer.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// ConnectTimeout is the maximum amount of time a dial will wait for
|
||||
// a connect to complete.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -19,24 +19,28 @@ func GetModeConfiguration(mode aws.DefaultsMode) (Configuration, error) {
|
|||
case aws.DefaultsModeCrossRegion:
|
||||
settings := Configuration{
|
||||
ConnectTimeout: aws.Duration(3100 * time.Millisecond),
|
||||
RetryMode: aws.RetryMode("standard"),
|
||||
TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond),
|
||||
}
|
||||
return settings, nil
|
||||
case aws.DefaultsModeInRegion:
|
||||
settings := Configuration{
|
||||
ConnectTimeout: aws.Duration(1100 * time.Millisecond),
|
||||
RetryMode: aws.RetryMode("standard"),
|
||||
TLSNegotiationTimeout: aws.Duration(1100 * time.Millisecond),
|
||||
}
|
||||
return settings, nil
|
||||
case aws.DefaultsModeMobile:
|
||||
settings := Configuration{
|
||||
ConnectTimeout: aws.Duration(30000 * time.Millisecond),
|
||||
RetryMode: aws.RetryMode("standard"),
|
||||
TLSNegotiationTimeout: aws.Duration(30000 * time.Millisecond),
|
||||
}
|
||||
return settings, nil
|
||||
case aws.DefaultsModeStandard:
|
||||
settings := Configuration{
|
||||
ConnectTimeout: aws.Duration(3100 * time.Millisecond),
|
||||
RetryMode: aws.RetryMode("standard"),
|
||||
TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond),
|
||||
}
|
||||
return settings, nil
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.13.0"
|
||||
const goModuleVersion = "1.14.0"
|
||||
|
|
|
|||
|
|
@ -7,17 +7,19 @@ import (
|
|||
// TokenBucket provides a concurrency safe utility for adding and removing
|
||||
// tokens from the available token bucket.
|
||||
type TokenBucket struct {
|
||||
capacity uint
|
||||
maxCapacity uint
|
||||
mu sync.Mutex
|
||||
remainingTokens uint
|
||||
maxCapacity uint
|
||||
minCapacity uint
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
// NewTokenBucket returns an initialized TokenBucket with the capacity
|
||||
// specified.
|
||||
func NewTokenBucket(i uint) *TokenBucket {
|
||||
return &TokenBucket{
|
||||
capacity: i,
|
||||
maxCapacity: i,
|
||||
remainingTokens: i,
|
||||
maxCapacity: i,
|
||||
minCapacity: 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -25,17 +27,18 @@ func NewTokenBucket(i uint) *TokenBucket {
|
|||
// there are tokens available true will be returned along with the number of
|
||||
// available tokens remaining. If amount requested is larger than the available
|
||||
// capacity, false will be returned along with the available capacity. If the
|
||||
// amount is less than the available capacity
|
||||
// amount is less than the available capacity, the capacity will be reduced by
|
||||
// that amount, and the remaining capacity and true will be returned.
|
||||
func (t *TokenBucket) Retrieve(amount uint) (available uint, retrieved bool) {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
if amount > t.capacity {
|
||||
return t.capacity, false
|
||||
if amount > t.remainingTokens {
|
||||
return t.remainingTokens, false
|
||||
}
|
||||
|
||||
t.capacity -= amount
|
||||
return t.capacity, true
|
||||
t.remainingTokens -= amount
|
||||
return t.remainingTokens, true
|
||||
}
|
||||
|
||||
// Refund returns the amount of tokens back to the available token bucket, up
|
||||
|
|
@ -44,8 +47,50 @@ func (t *TokenBucket) Refund(amount uint) {
|
|||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
t.capacity += amount
|
||||
if t.capacity > t.maxCapacity {
|
||||
t.capacity = t.maxCapacity
|
||||
}
|
||||
// Capacity cannot exceed max capacity.
|
||||
t.remainingTokens = uintMin(t.remainingTokens+amount, t.maxCapacity)
|
||||
}
|
||||
|
||||
// Capacity returns the maximum capacity of tokens that the bucket could
|
||||
// contain.
|
||||
func (t *TokenBucket) Capacity() uint {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
return t.maxCapacity
|
||||
}
|
||||
|
||||
// Remaining returns the number of tokens that remaining in the bucket.
|
||||
func (t *TokenBucket) Remaining() uint {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
return t.remainingTokens
|
||||
}
|
||||
|
||||
// Resize adjusts the size of the token bucket. Returns the capacity remaining.
|
||||
func (t *TokenBucket) Resize(size uint) uint {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
t.maxCapacity = uintMax(size, t.minCapacity)
|
||||
|
||||
// Capacity needs to be capped at max capacity, if max size reduced.
|
||||
t.remainingTokens = uintMin(t.remainingTokens, t.maxCapacity)
|
||||
|
||||
return t.remainingTokens
|
||||
}
|
||||
|
||||
func uintMin(a, b uint) uint {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func uintMax(a, b uint) uint {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ func (l *TokenRateLimit) AddTokens(v uint) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Remaining returns the number of remaining tokens in the bucket.
|
||||
func (l *TokenRateLimit) Remaining() uint {
|
||||
return l.bucket.Remaining()
|
||||
}
|
||||
|
||||
// QuotaExceededError provides the SDK error when the retries for a given
|
||||
// token bucket have been exhausted.
|
||||
type QuotaExceededError struct {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,156 @@
|
|||
package retry
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultRequestCost is the cost of a single request from the adaptive
|
||||
// rate limited token bucket.
|
||||
DefaultRequestCost uint = 1
|
||||
)
|
||||
|
||||
// DefaultThrottles provides the set of errors considered throttle errors that
|
||||
// are checked by default.
|
||||
var DefaultThrottles = []IsErrorThrottle{
|
||||
ThrottleErrorCode{
|
||||
Codes: DefaultThrottleErrorCodes,
|
||||
},
|
||||
}
|
||||
|
||||
// AdaptiveModeOptions provides the functional options for configuring the
|
||||
// adaptive retry mode, and delay behavior.
|
||||
type AdaptiveModeOptions struct {
|
||||
// If the adaptive token bucket is empty, when an attempt will be made
|
||||
// AdaptiveMode will sleep until a token is available. This can occur when
|
||||
// attempts fail with throttle errors. Use this option to disable the sleep
|
||||
// until token is available, and return error immediately.
|
||||
FailOnNoAttemptTokens bool
|
||||
|
||||
// The cost of an attempt from the AdaptiveMode's adaptive token bucket.
|
||||
RequestCost uint
|
||||
|
||||
// Set of strategies to determine if the attempt failed due to a throttle
|
||||
// error.
|
||||
//
|
||||
// It is safe to append to this list in NewAdaptiveMode's functional options.
|
||||
Throttles []IsErrorThrottle
|
||||
|
||||
// Set of options for standard retry mode that AdaptiveMode is built on top
|
||||
// of. AdaptiveMode may apply its own defaults to Standard retry mode that
|
||||
// are different than the defaults of NewStandard. Use these options to
|
||||
// override the default options.
|
||||
StandardOptions []func(*StandardOptions)
|
||||
}
|
||||
|
||||
// AdaptiveMode provides an experimental retry strategy that expands on the
|
||||
// Standard retry strategy, adding client attempt rate limits. The attempt rate
|
||||
// limit is initially unrestricted, but becomes restricted when the attempt
|
||||
// fails with for a throttle error. When restricted AdaptiveMode may need to
|
||||
// sleep before an attempt is made, if too many throttles have been received.
|
||||
// AdaptiveMode's sleep can be canceled with context cancel. Set
|
||||
// AdaptiveModeOptions FailOnNoAttemptTokens to change the behavior from sleep,
|
||||
// to fail fast.
|
||||
//
|
||||
// Eventually unrestricted attempt rate limit will be restored once attempts no
|
||||
// longer are failing due to throttle errors.
|
||||
type AdaptiveMode struct {
|
||||
options AdaptiveModeOptions
|
||||
throttles IsErrorThrottles
|
||||
|
||||
retryer aws.RetryerV2
|
||||
rateLimit *adaptiveRateLimit
|
||||
}
|
||||
|
||||
// NewAdaptiveMode returns an initialized AdaptiveMode retry strategy.
|
||||
func NewAdaptiveMode(optFns ...func(*AdaptiveModeOptions)) *AdaptiveMode {
|
||||
o := AdaptiveModeOptions{
|
||||
RequestCost: DefaultRequestCost,
|
||||
Throttles: append([]IsErrorThrottle{}, DefaultThrottles...),
|
||||
}
|
||||
for _, fn := range optFns {
|
||||
fn(&o)
|
||||
}
|
||||
|
||||
return &AdaptiveMode{
|
||||
options: o,
|
||||
throttles: IsErrorThrottles(o.Throttles),
|
||||
retryer: NewStandard(o.StandardOptions...),
|
||||
rateLimit: newAdaptiveRateLimit(),
|
||||
}
|
||||
}
|
||||
|
||||
// IsErrorRetryable returns if the failed attempt is retryable. This check
|
||||
// should determine if the error can be retried, or if the error is
|
||||
// terminal.
|
||||
func (a *AdaptiveMode) IsErrorRetryable(err error) bool {
|
||||
return a.retryer.IsErrorRetryable(err)
|
||||
}
|
||||
|
||||
// MaxAttempts returns the maximum number of attempts that can be made for
|
||||
// a attempt before failing. A value of 0 implies that the attempt should
|
||||
// be retried until it succeeds if the errors are retryable.
|
||||
func (a *AdaptiveMode) MaxAttempts() int {
|
||||
return a.retryer.MaxAttempts()
|
||||
}
|
||||
|
||||
// RetryDelay returns the delay that should be used before retrying the
|
||||
// attempt. Will return error if the if the delay could not be determined.
|
||||
func (a *AdaptiveMode) RetryDelay(attempt int, opErr error) (
|
||||
time.Duration, error,
|
||||
) {
|
||||
return a.retryer.RetryDelay(attempt, opErr)
|
||||
}
|
||||
|
||||
// GetRetryToken attempts to deduct the retry cost from the retry token pool.
|
||||
// Returning the token release function, or error.
|
||||
func (a *AdaptiveMode) GetRetryToken(ctx context.Context, opErr error) (
|
||||
releaseToken func(error) error, err error,
|
||||
) {
|
||||
return a.retryer.GetRetryToken(ctx, opErr)
|
||||
}
|
||||
|
||||
// GetInitialToken returns the initial attempt token that can increment the
|
||||
// retry token pool if the attempt is successful.
|
||||
//
|
||||
// Deprecated: This method does not provide a way to block using Context,
|
||||
// nor can it return an error. Use RetryerV2, and GetAttemptToken instead. Only
|
||||
// present to implement Retryer interface.
|
||||
func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) {
|
||||
return nopRelease
|
||||
}
|
||||
|
||||
// GetAttemptToken returns the attempt token that can be used to rate limit
|
||||
// attempt calls. Will be used by the SDK's retry package's Attempt
|
||||
// middleware to get a attempt token prior to calling the temp and releasing
|
||||
// the attempt token after the attempt has been made.
|
||||
func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) {
|
||||
for {
|
||||
acquiredToken, waitTryAgain := a.rateLimit.AcquireToken(a.options.RequestCost)
|
||||
if acquiredToken {
|
||||
break
|
||||
}
|
||||
if a.options.FailOnNoAttemptTokens {
|
||||
return nil, fmt.Errorf(
|
||||
"unable to get attempt token, and FailOnNoAttemptTokens enables")
|
||||
}
|
||||
|
||||
if err := sdk.SleepWithContext(ctx, waitTryAgain); err != nil {
|
||||
return nil, fmt.Errorf("failed to wait for token to be available, %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return a.handleResponse, nil
|
||||
}
|
||||
|
||||
func (a *AdaptiveMode) handleResponse(opErr error) error {
|
||||
throttled := a.throttles.IsErrorThrottle(opErr).Bool()
|
||||
|
||||
a.rateLimit.Update(throttled)
|
||||
return nil
|
||||
}
|
||||
158
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go
generated
vendored
Normal file
158
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go
generated
vendored
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
package retry
|
||||
|
||||
import (
|
||||
"math"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
)
|
||||
|
||||
type adaptiveRateLimit struct {
|
||||
tokenBucketEnabled bool
|
||||
|
||||
smooth float64
|
||||
beta float64
|
||||
scaleConstant float64
|
||||
minFillRate float64
|
||||
|
||||
fillRate float64
|
||||
calculatedRate float64
|
||||
lastRefilled time.Time
|
||||
measuredTxRate float64
|
||||
lastTxRateBucket float64
|
||||
requestCount int64
|
||||
lastMaxRate float64
|
||||
lastThrottleTime time.Time
|
||||
timeWindow float64
|
||||
|
||||
tokenBucket *adaptiveTokenBucket
|
||||
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func newAdaptiveRateLimit() *adaptiveRateLimit {
|
||||
now := sdk.NowTime()
|
||||
return &adaptiveRateLimit{
|
||||
smooth: 0.8,
|
||||
beta: 0.7,
|
||||
scaleConstant: 0.4,
|
||||
|
||||
minFillRate: 0.5,
|
||||
|
||||
lastTxRateBucket: math.Floor(timeFloat64Seconds(now)),
|
||||
lastThrottleTime: now,
|
||||
|
||||
tokenBucket: newAdaptiveTokenBucket(0),
|
||||
}
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) Enable(v bool) {
|
||||
a.mu.Lock()
|
||||
defer a.mu.Unlock()
|
||||
|
||||
a.tokenBucketEnabled = v
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) AcquireToken(amount uint) (
|
||||
tokenAcquired bool, waitTryAgain time.Duration,
|
||||
) {
|
||||
a.mu.Lock()
|
||||
defer a.mu.Unlock()
|
||||
|
||||
if !a.tokenBucketEnabled {
|
||||
return true, 0
|
||||
}
|
||||
|
||||
a.tokenBucketRefill()
|
||||
|
||||
available, ok := a.tokenBucket.Retrieve(float64(amount))
|
||||
if !ok {
|
||||
waitDur := float64Seconds((float64(amount) - available) / a.fillRate)
|
||||
return false, waitDur
|
||||
}
|
||||
|
||||
return true, 0
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) Update(throttled bool) {
|
||||
a.mu.Lock()
|
||||
defer a.mu.Unlock()
|
||||
|
||||
a.updateMeasuredRate()
|
||||
|
||||
if throttled {
|
||||
rateToUse := a.measuredTxRate
|
||||
if a.tokenBucketEnabled {
|
||||
rateToUse = math.Min(a.measuredTxRate, a.fillRate)
|
||||
}
|
||||
|
||||
a.lastMaxRate = rateToUse
|
||||
a.calculateTimeWindow()
|
||||
a.lastThrottleTime = sdk.NowTime()
|
||||
a.calculatedRate = a.cubicThrottle(rateToUse)
|
||||
a.tokenBucketEnabled = true
|
||||
} else {
|
||||
a.calculateTimeWindow()
|
||||
a.calculatedRate = a.cubicSuccess(sdk.NowTime())
|
||||
}
|
||||
|
||||
newRate := math.Min(a.calculatedRate, 2*a.measuredTxRate)
|
||||
a.tokenBucketUpdateRate(newRate)
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) cubicSuccess(t time.Time) float64 {
|
||||
dt := secondsFloat64(t.Sub(a.lastThrottleTime))
|
||||
return (a.scaleConstant * math.Pow(dt-a.timeWindow, 3)) + a.lastMaxRate
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) cubicThrottle(rateToUse float64) float64 {
|
||||
return rateToUse * a.beta
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) calculateTimeWindow() {
|
||||
a.timeWindow = math.Pow((a.lastMaxRate*(1.-a.beta))/a.scaleConstant, 1./3.)
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) tokenBucketUpdateRate(newRPS float64) {
|
||||
a.tokenBucketRefill()
|
||||
a.fillRate = math.Max(newRPS, a.minFillRate)
|
||||
a.tokenBucket.Resize(newRPS)
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) updateMeasuredRate() {
|
||||
now := sdk.NowTime()
|
||||
timeBucket := math.Floor(timeFloat64Seconds(now)*2.) / 2.
|
||||
a.requestCount++
|
||||
|
||||
if timeBucket > a.lastTxRateBucket {
|
||||
currentRate := float64(a.requestCount) / (timeBucket - a.lastTxRateBucket)
|
||||
a.measuredTxRate = (currentRate * a.smooth) + (a.measuredTxRate * (1. - a.smooth))
|
||||
a.requestCount = 0
|
||||
a.lastTxRateBucket = timeBucket
|
||||
}
|
||||
}
|
||||
|
||||
func (a *adaptiveRateLimit) tokenBucketRefill() {
|
||||
now := sdk.NowTime()
|
||||
if a.lastRefilled.IsZero() {
|
||||
a.lastRefilled = now
|
||||
return
|
||||
}
|
||||
|
||||
fillAmount := secondsFloat64(now.Sub(a.lastRefilled)) * a.fillRate
|
||||
a.tokenBucket.Refund(fillAmount)
|
||||
a.lastRefilled = now
|
||||
}
|
||||
|
||||
func float64Seconds(v float64) time.Duration {
|
||||
return time.Duration(v * float64(time.Second))
|
||||
}
|
||||
|
||||
func secondsFloat64(v time.Duration) float64 {
|
||||
return float64(v) / float64(time.Second)
|
||||
}
|
||||
|
||||
func timeFloat64Seconds(v time.Time) float64 {
|
||||
return float64(v.UnixNano()) / float64(time.Second)
|
||||
}
|
||||
83
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go
generated
vendored
Normal file
83
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package retry
|
||||
|
||||
import (
|
||||
"math"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// adaptiveTokenBucket provides a concurrency safe utility for adding and
|
||||
// removing tokens from the available token bucket.
|
||||
type adaptiveTokenBucket struct {
|
||||
remainingTokens float64
|
||||
maxCapacity float64
|
||||
minCapacity float64
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
// newAdaptiveTokenBucket returns an initialized adaptiveTokenBucket with the
|
||||
// capacity specified.
|
||||
func newAdaptiveTokenBucket(i float64) *adaptiveTokenBucket {
|
||||
return &adaptiveTokenBucket{
|
||||
remainingTokens: i,
|
||||
maxCapacity: i,
|
||||
minCapacity: 1,
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve attempts to reduce the available tokens by the amount requested. If
|
||||
// there are tokens available true will be returned along with the number of
|
||||
// available tokens remaining. If amount requested is larger than the available
|
||||
// capacity, false will be returned along with the available capacity. If the
|
||||
// amount is less than the available capacity, the capacity will be reduced by
|
||||
// that amount, and the remaining capacity and true will be returned.
|
||||
func (t *adaptiveTokenBucket) Retrieve(amount float64) (available float64, retrieved bool) {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
if amount > t.remainingTokens {
|
||||
return t.remainingTokens, false
|
||||
}
|
||||
|
||||
t.remainingTokens -= amount
|
||||
return t.remainingTokens, true
|
||||
}
|
||||
|
||||
// Refund returns the amount of tokens back to the available token bucket, up
|
||||
// to the initial capacity.
|
||||
func (t *adaptiveTokenBucket) Refund(amount float64) {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
// Capacity cannot exceed max capacity.
|
||||
t.remainingTokens = math.Min(t.remainingTokens+amount, t.maxCapacity)
|
||||
}
|
||||
|
||||
// Capacity returns the maximum capacity of tokens that the bucket could
|
||||
// contain.
|
||||
func (t *adaptiveTokenBucket) Capacity() float64 {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
return t.maxCapacity
|
||||
}
|
||||
|
||||
// Remaining returns the number of tokens that remaining in the bucket.
|
||||
func (t *adaptiveTokenBucket) Remaining() float64 {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
return t.remainingTokens
|
||||
}
|
||||
|
||||
// Resize adjusts the size of the token bucket. Returns the capacity remaining.
|
||||
func (t *adaptiveTokenBucket) Resize(size float64) float64 {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
t.maxCapacity = math.Max(size, t.minCapacity)
|
||||
|
||||
// Capacity needs to be capped at max capacity, if max size reduced.
|
||||
t.remainingTokens = math.Min(t.remainingTokens, t.maxCapacity)
|
||||
|
||||
return t.remainingTokens
|
||||
}
|
||||
|
|
@ -35,13 +35,16 @@ type Attempt struct {
|
|||
// attempts are reached.
|
||||
LogAttempts bool
|
||||
|
||||
retryer aws.Retryer
|
||||
retryer aws.RetryerV2
|
||||
requestCloner RequestCloner
|
||||
}
|
||||
|
||||
// NewAttemptMiddleware returns a new Attempt retry middleware.
|
||||
func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt {
|
||||
m := &Attempt{retryer: retryer, requestCloner: requestCloner}
|
||||
m := &Attempt{
|
||||
retryer: wrapAsRetryerV2(retryer),
|
||||
requestCloner: requestCloner,
|
||||
}
|
||||
for _, fn := range optFns {
|
||||
fn(m)
|
||||
}
|
||||
|
|
@ -49,9 +52,7 @@ func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optF
|
|||
}
|
||||
|
||||
// ID returns the middleware identifier
|
||||
func (r *Attempt) ID() string {
|
||||
return "Retry"
|
||||
}
|
||||
func (r *Attempt) ID() string { return "Retry" }
|
||||
|
||||
func (r Attempt) logf(logger logging.Logger, classification logging.Classification, format string, v ...interface{}) {
|
||||
if !r.LogAttempts {
|
||||
|
|
@ -120,10 +121,23 @@ func (r *Attempt) handleAttempt(
|
|||
attemptResult.Err = err
|
||||
}()
|
||||
|
||||
// Short circuit if this attempt never can succeed because the context is
|
||||
// canceled. This reduces the chance of token pools being modified for
|
||||
// attempts that will not be made
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return out, attemptResult, nopRelease, ctx.Err()
|
||||
default:
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Get Initial (aka Send) Token
|
||||
// Get Attempt Token
|
||||
//------------------------------
|
||||
releaseInitialToken := r.retryer.GetInitialToken()
|
||||
releaseAttemptToken, err := r.retryer.GetAttemptToken(ctx)
|
||||
if err != nil {
|
||||
return out, attemptResult, nopRelease, fmt.Errorf(
|
||||
"failed to get retry Send token, %w", err)
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Send Attempt
|
||||
|
|
@ -139,12 +153,13 @@ func (r *Attempt) handleAttempt(
|
|||
if attemptNum > 1 {
|
||||
if rewindable, ok := in.Request.(interface{ RewindStream() error }); ok {
|
||||
if rewindErr := rewindable.RewindStream(); rewindErr != nil {
|
||||
err = fmt.Errorf("failed to rewind transport stream for retry, %w", rewindErr)
|
||||
return out, attemptResult, nopRelease, err
|
||||
return out, attemptResult, nopRelease, fmt.Errorf(
|
||||
"failed to rewind transport stream for retry, %w", rewindErr)
|
||||
}
|
||||
}
|
||||
|
||||
r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d", service, operation, attemptNum)
|
||||
r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d",
|
||||
service, operation, attemptNum)
|
||||
}
|
||||
|
||||
var metadata smithymiddle.Metadata
|
||||
|
|
@ -154,15 +169,15 @@ func (r *Attempt) handleAttempt(
|
|||
//------------------------------
|
||||
// Bookkeeping
|
||||
//------------------------------
|
||||
// Release the initial send token based on the state of the attempt's error (if any).
|
||||
if releaseError := releaseInitialToken(err); releaseError != nil && err != nil {
|
||||
err = fmt.Errorf("failed to release initial token after request error, %w", err)
|
||||
return out, attemptResult, nopRelease, err
|
||||
}
|
||||
// Release the retry token based on the state of the attempt's error (if any).
|
||||
if releaseError := releaseRetryToken(err); releaseError != nil && err != nil {
|
||||
err = fmt.Errorf("failed to release retry token after request error, %w", err)
|
||||
return out, attemptResult, nopRelease, err
|
||||
return out, attemptResult, nopRelease, fmt.Errorf(
|
||||
"failed to release retry token after request error, %w", err)
|
||||
}
|
||||
// Release the attempt token based on the state of the attempt's error (if any).
|
||||
if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil {
|
||||
return out, attemptResult, nopRelease, fmt.Errorf(
|
||||
"failed to release initial token after request error, %w", err)
|
||||
}
|
||||
// If there was no error making the attempt, nothing further to do. There
|
||||
// will be nothing to retry.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package retry
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
|
|
@ -17,13 +18,13 @@ func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer {
|
|||
}
|
||||
|
||||
return &withIsErrorRetryable{
|
||||
Retryer: r,
|
||||
RetryerV2: wrapAsRetryerV2(r),
|
||||
Retryable: retryable,
|
||||
}
|
||||
}
|
||||
|
||||
type withIsErrorRetryable struct {
|
||||
aws.Retryer
|
||||
aws.RetryerV2
|
||||
Retryable IsErrorRetryable
|
||||
}
|
||||
|
||||
|
|
@ -31,20 +32,20 @@ func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool {
|
|||
if v := r.Retryable.IsErrorRetryable(err); v != aws.UnknownTernary {
|
||||
return v.Bool()
|
||||
}
|
||||
return r.Retryer.IsErrorRetryable(err)
|
||||
return r.RetryerV2.IsErrorRetryable(err)
|
||||
}
|
||||
|
||||
// AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value
|
||||
// specified.
|
||||
func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer {
|
||||
return &withMaxAttempts{
|
||||
Retryer: r,
|
||||
Max: max,
|
||||
RetryerV2: wrapAsRetryerV2(r),
|
||||
Max: max,
|
||||
}
|
||||
}
|
||||
|
||||
type withMaxAttempts struct {
|
||||
aws.Retryer
|
||||
aws.RetryerV2
|
||||
Max int
|
||||
}
|
||||
|
||||
|
|
@ -57,16 +58,33 @@ func (w *withMaxAttempts) MaxAttempts() int {
|
|||
// delay.
|
||||
func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer {
|
||||
return &withMaxBackoffDelay{
|
||||
Retryer: r,
|
||||
backoff: NewExponentialJitterBackoff(delay),
|
||||
RetryerV2: wrapAsRetryerV2(r),
|
||||
backoff: NewExponentialJitterBackoff(delay),
|
||||
}
|
||||
}
|
||||
|
||||
type withMaxBackoffDelay struct {
|
||||
aws.Retryer
|
||||
aws.RetryerV2
|
||||
backoff *ExponentialJitterBackoff
|
||||
}
|
||||
|
||||
func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) {
|
||||
return r.backoff.BackoffDelay(attempt, err)
|
||||
}
|
||||
|
||||
type wrappedAsRetryerV2 struct {
|
||||
aws.Retryer
|
||||
}
|
||||
|
||||
func wrapAsRetryerV2(r aws.Retryer) aws.RetryerV2 {
|
||||
v, ok := r.(aws.RetryerV2)
|
||||
if !ok {
|
||||
v = wrappedAsRetryerV2{Retryer: r}
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
func (w wrappedAsRetryerV2) GetAttemptToken(context.Context) (func(error) error, error) {
|
||||
return w.Retryer.GetInitialToken(), nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package retry
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws/ratelimit"
|
||||
|
|
@ -52,8 +53,11 @@ var DefaultRetryableHTTPStatusCodes = map[int]struct{}{
|
|||
var DefaultRetryableErrorCodes = map[string]struct{}{
|
||||
"RequestTimeout": {},
|
||||
"RequestTimeoutException": {},
|
||||
}
|
||||
|
||||
// Throttled status codes
|
||||
// DefaultThrottleErrorCodes provides the set of API error codes that are
|
||||
// considered throttle errors.
|
||||
var DefaultThrottleErrorCodes = map[string]struct{}{
|
||||
"Throttling": {},
|
||||
"ThrottlingException": {},
|
||||
"ThrottledException": {},
|
||||
|
|
@ -82,33 +86,66 @@ var DefaultRetryables = []IsErrorRetryable{
|
|||
RetryableErrorCode{
|
||||
Codes: DefaultRetryableErrorCodes,
|
||||
},
|
||||
RetryableErrorCode{
|
||||
Codes: DefaultThrottleErrorCodes,
|
||||
},
|
||||
}
|
||||
|
||||
// DefaultTimeouts provides the set of timeout checks that are used by default.
|
||||
var DefaultTimeouts = []IsErrorTimeout{
|
||||
TimeouterError{},
|
||||
}
|
||||
|
||||
// StandardOptions provides the functional options for configuring the standard
|
||||
// retryable, and delay behavior.
|
||||
type StandardOptions struct {
|
||||
// Maximum number of attempts that should be made.
|
||||
MaxAttempts int
|
||||
MaxBackoff time.Duration
|
||||
Backoff BackoffDelayer
|
||||
|
||||
// MaxBackoff duration between retried attempts.
|
||||
MaxBackoff time.Duration
|
||||
|
||||
// Provides the backoff strategy the retryer will use to determine the
|
||||
// delay between retry attempts.
|
||||
Backoff BackoffDelayer
|
||||
|
||||
// Set of strategies to determine if the attempt should be retried based on
|
||||
// the error response received.
|
||||
//
|
||||
// It is safe to append to this list in NewStandard's functional options.
|
||||
Retryables []IsErrorRetryable
|
||||
Timeouts []IsErrorTimeout
|
||||
|
||||
RateLimiter RateLimiter
|
||||
RetryCost uint
|
||||
// Set of strategies to determine if the attempt failed due to a timeout
|
||||
// error.
|
||||
//
|
||||
// It is safe to append to this list in NewStandard's functional options.
|
||||
Timeouts []IsErrorTimeout
|
||||
|
||||
// Provides the rate limiting strategy for rate limiting attempt retries
|
||||
// across all attempts the retryer is being used with.
|
||||
RateLimiter RateLimiter
|
||||
|
||||
// The cost to deduct from the RateLimiter's token bucket per retry.
|
||||
RetryCost uint
|
||||
|
||||
// The cost to deduct from the RateLimiter's token bucket per retry caused
|
||||
// by timeout error.
|
||||
RetryTimeoutCost uint
|
||||
|
||||
// The cost to payback to the RateLimiter's token bucket for successful
|
||||
// attempts.
|
||||
NoRetryIncrement uint
|
||||
}
|
||||
|
||||
// RateLimiter provides the interface for limiting the rate of request retries
|
||||
// allowed by the retrier.
|
||||
// RateLimiter provides the interface for limiting the rate of attempt retries
|
||||
// allowed by the retryer.
|
||||
type RateLimiter interface {
|
||||
GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error)
|
||||
AddTokens(uint) error
|
||||
}
|
||||
|
||||
// Standard is the standard retry pattern for the SDK. It uses a set of
|
||||
// retryable checks to determine of the failed request should be retried, and
|
||||
// retryable checks to determine of the failed attempt should be retried, and
|
||||
// what retry delay should be used.
|
||||
type Standard struct {
|
||||
options StandardOptions
|
||||
|
|
@ -124,7 +161,8 @@ func NewStandard(fnOpts ...func(*StandardOptions)) *Standard {
|
|||
o := StandardOptions{
|
||||
MaxAttempts: DefaultMaxAttempts,
|
||||
MaxBackoff: DefaultMaxBackoff,
|
||||
Retryables: DefaultRetryables,
|
||||
Retryables: append([]IsErrorRetryable{}, DefaultRetryables...),
|
||||
Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...),
|
||||
|
||||
RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens),
|
||||
RetryCost: DefaultRetryCost,
|
||||
|
|
@ -134,23 +172,20 @@ func NewStandard(fnOpts ...func(*StandardOptions)) *Standard {
|
|||
for _, fn := range fnOpts {
|
||||
fn(&o)
|
||||
}
|
||||
if o.MaxAttempts <= 0 {
|
||||
o.MaxAttempts = DefaultMaxAttempts
|
||||
}
|
||||
|
||||
backoff := o.Backoff
|
||||
if backoff == nil {
|
||||
backoff = NewExponentialJitterBackoff(o.MaxBackoff)
|
||||
}
|
||||
|
||||
rs := make([]IsErrorRetryable, len(o.Retryables))
|
||||
copy(rs, o.Retryables)
|
||||
|
||||
ts := make([]IsErrorTimeout, len(o.Timeouts))
|
||||
copy(ts, o.Timeouts)
|
||||
|
||||
return &Standard{
|
||||
options: o,
|
||||
backoff: backoff,
|
||||
retryable: IsErrorRetryables(rs),
|
||||
timeout: IsErrorTimeouts(ts),
|
||||
retryable: IsErrorRetryables(o.Retryables),
|
||||
timeout: IsErrorTimeouts(o.Timeouts),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -171,30 +206,40 @@ func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) {
|
|||
return s.backoff.BackoffDelay(attempt, err)
|
||||
}
|
||||
|
||||
// GetAttemptToken returns the token to be released after then attempt completes.
|
||||
// The release token will add NoRetryIncrement to the RateLimiter token pool if
|
||||
// the attempt was successful. If the attempt failed, nothing will be done.
|
||||
func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) {
|
||||
return s.GetInitialToken(), nil
|
||||
}
|
||||
|
||||
// GetInitialToken returns a token for adding the NoRetryIncrement to the
|
||||
// RateLimiter token if the attempt completed successfully without error.
|
||||
//
|
||||
// InitialToken applies to result of the each attempt, including the first.
|
||||
// Whereas the RetryToken applies to the result of subsequent attempts.
|
||||
//
|
||||
// Deprecated: use GetAttemptToken instead.
|
||||
func (s *Standard) GetInitialToken() func(error) error {
|
||||
return releaseToken(s.incrementTokens).release
|
||||
return releaseToken(s.noRetryIncrement).release
|
||||
}
|
||||
|
||||
func (s *Standard) incrementTokens() error {
|
||||
func (s *Standard) noRetryIncrement() error {
|
||||
return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement)
|
||||
}
|
||||
|
||||
// GetRetryToken attempts to deduct the retry cost from the retry token pool.
|
||||
// Returning the token release function, or error.
|
||||
func (s *Standard) GetRetryToken(ctx context.Context, err error) (func(error) error, error) {
|
||||
func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) {
|
||||
cost := s.options.RetryCost
|
||||
if s.timeout.IsErrorTimeout(err).Bool() {
|
||||
|
||||
if s.timeout.IsErrorTimeout(opErr).Bool() {
|
||||
cost = s.options.RetryTimeoutCost
|
||||
}
|
||||
|
||||
fn, err := s.options.RateLimiter.GetToken(ctx, cost)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("failed to get rate limit token, %w", err)
|
||||
}
|
||||
|
||||
return releaseToken(fn).release, nil
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package retry
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
)
|
||||
|
||||
// IsErrorThrottle provides the interface of an implementation to determine if
|
||||
// a error response from an operation is a throttling error.
|
||||
type IsErrorThrottle interface {
|
||||
IsErrorThrottle(error) aws.Ternary
|
||||
}
|
||||
|
||||
// IsErrorThrottles is a collection of checks to determine of the error a
|
||||
// throttle error. Iterates through the checks and returns the state of
|
||||
// throttle if any check returns something other than unknown.
|
||||
type IsErrorThrottles []IsErrorThrottle
|
||||
|
||||
// IsErrorThrottle returns if the error is a throttle error if any of the
|
||||
// checks in the list return a value other than unknown.
|
||||
func (r IsErrorThrottles) IsErrorThrottle(err error) aws.Ternary {
|
||||
for _, re := range r {
|
||||
if v := re.IsErrorThrottle(err); v != aws.UnknownTernary {
|
||||
return v
|
||||
}
|
||||
}
|
||||
return aws.UnknownTernary
|
||||
}
|
||||
|
||||
// IsErrorThrottleFunc wraps a function with the IsErrorThrottle interface.
|
||||
type IsErrorThrottleFunc func(error) aws.Ternary
|
||||
|
||||
// IsErrorThrottle returns if the error is a throttle error.
|
||||
func (fn IsErrorThrottleFunc) IsErrorThrottle(err error) aws.Ternary {
|
||||
return fn(err)
|
||||
}
|
||||
|
||||
// ThrottleErrorCode determines if an attempt should be retried based on the
|
||||
// API error code.
|
||||
type ThrottleErrorCode struct {
|
||||
Codes map[string]struct{}
|
||||
}
|
||||
|
||||
// IsErrorThrottle return if the error is a throttle error based on the error
|
||||
// codes. Returns unknown if the error doesn't have a code or it is unknown.
|
||||
func (r ThrottleErrorCode) IsErrorThrottle(err error) aws.Ternary {
|
||||
var v interface{ ErrorCode() string }
|
||||
|
||||
if !errors.As(err, &v) {
|
||||
return aws.UnknownTernary
|
||||
}
|
||||
|
||||
_, ok := r.Codes[v.ErrorCode()]
|
||||
if !ok {
|
||||
return aws.UnknownTernary
|
||||
}
|
||||
|
||||
return aws.TrueTernary
|
||||
}
|
||||
|
|
@ -6,34 +6,94 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// RetryMode provides the mode the API client will use to create a retryer
|
||||
// based on.
|
||||
type RetryMode string
|
||||
|
||||
const (
|
||||
// RetryModeStandard model provides rate limited retry attempts with
|
||||
// exponential backoff delay.
|
||||
RetryModeStandard RetryMode = "standard"
|
||||
|
||||
// RetryModeAdaptive model provides attempt send rate limiting on throttle
|
||||
// responses in addition to standard mode's retry rate limiting.
|
||||
//
|
||||
// Adaptive retry mode is experimental and is subject to change in the
|
||||
// future.
|
||||
RetryModeAdaptive RetryMode = "adaptive"
|
||||
)
|
||||
|
||||
// ParseRetryMode attempts to parse a RetryMode from the given string.
|
||||
// Returning error if the value is not a known RetryMode.
|
||||
func ParseRetryMode(v string) (mode RetryMode, err error) {
|
||||
switch v {
|
||||
case "standard":
|
||||
return RetryModeStandard, nil
|
||||
case "adaptive":
|
||||
return RetryModeAdaptive, nil
|
||||
default:
|
||||
return mode, fmt.Errorf("unknown RetryMode, %v", v)
|
||||
}
|
||||
}
|
||||
|
||||
func (m RetryMode) String() string { return string(m) }
|
||||
|
||||
// Retryer is an interface to determine if a given error from a
|
||||
// request should be retried, and if so what backoff delay to apply. The
|
||||
// attempt should be retried, and if so what backoff delay to apply. The
|
||||
// default implementation used by most services is the retry package's Standard
|
||||
// type. Which contains basic retry logic using exponential backoff.
|
||||
type Retryer interface {
|
||||
// IsErrorRetryable returns if the failed request is retryable. This check
|
||||
// IsErrorRetryable returns if the failed attempt is retryable. This check
|
||||
// should determine if the error can be retried, or if the error is
|
||||
// terminal.
|
||||
IsErrorRetryable(error) bool
|
||||
|
||||
// MaxAttempts returns the maximum number of attempts that can be made for
|
||||
// a request before failing. A value of 0 implies that the request should
|
||||
// a attempt before failing. A value of 0 implies that the attempt should
|
||||
// be retried until it succeeds if the errors are retryable.
|
||||
MaxAttempts() int
|
||||
|
||||
// RetryDelay returns the delay that should be used before retrying the
|
||||
// request. Will return error if the if the delay could not be determined.
|
||||
// attempt. Will return error if the if the delay could not be determined.
|
||||
RetryDelay(attempt int, opErr error) (time.Duration, error)
|
||||
|
||||
// GetRetryToken attempts to deduct the retry cost from the retry token pool.
|
||||
// Returning the token release function, or error.
|
||||
GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error)
|
||||
|
||||
// GetInitialToken returns the initial request token that can increment the
|
||||
// retry token pool if the request is successful.
|
||||
// GetInitialToken returns the initial attempt token that can increment the
|
||||
// retry token pool if the attempt is successful.
|
||||
GetInitialToken() (releaseToken func(error) error)
|
||||
}
|
||||
|
||||
// RetryerV2 is an interface to determine if a given error from a attempt
|
||||
// should be retried, and if so what backoff delay to apply. The default
|
||||
// implementation used by most services is the retry package's Standard type.
|
||||
// Which contains basic retry logic using exponential backoff.
|
||||
//
|
||||
// RetryerV2 replaces the Retryer interface, deprecating the GetInitialToken
|
||||
// method in favor of GetAttemptToken which takes a context, and can return an error.
|
||||
//
|
||||
// The SDK's retry package's Attempt middleware, and utilities will always
|
||||
// wrap a Retryer as a RetryerV2. Delegating to GetInitialToken, only if
|
||||
// GetAttemptToken is not implemented.
|
||||
type RetryerV2 interface {
|
||||
Retryer
|
||||
|
||||
// GetInitialToken returns the initial attempt token that can increment the
|
||||
// retry token pool if the attempt is successful.
|
||||
//
|
||||
// Deprecated: This method does not provide a way to block using Context,
|
||||
// nor can it return an error. Use RetryerV2, and GetAttemptToken instead.
|
||||
GetInitialToken() (releaseToken func(error) error)
|
||||
|
||||
// GetAttemptToken returns the send token that can be used to rate limit
|
||||
// attempt calls. Will be used by the SDK's retry package's Attempt
|
||||
// middleware to get a send token prior to calling the temp and releasing
|
||||
// the send token after the attempt has been made.
|
||||
GetAttemptToken(context.Context) (func(error) error, error)
|
||||
}
|
||||
|
||||
// NopRetryer provides a RequestRetryDecider implementation that will flag
|
||||
// all attempt errors as not retryable, with a max attempts of 1.
|
||||
type NopRetryer struct{}
|
||||
|
|
@ -41,12 +101,12 @@ type NopRetryer struct{}
|
|||
// IsErrorRetryable returns false for all error values.
|
||||
func (NopRetryer) IsErrorRetryable(error) bool { return false }
|
||||
|
||||
// MaxAttempts always returns 1 for the original request attempt.
|
||||
// MaxAttempts always returns 1 for the original attempt.
|
||||
func (NopRetryer) MaxAttempts() int { return 1 }
|
||||
|
||||
// RetryDelay is not valid for the NopRetryer. Will always return error.
|
||||
func (NopRetryer) RetryDelay(int, error) (time.Duration, error) {
|
||||
return 0, fmt.Errorf("not retrying any request errors")
|
||||
return 0, fmt.Errorf("not retrying any attempt errors")
|
||||
}
|
||||
|
||||
// GetRetryToken returns a stub function that does nothing.
|
||||
|
|
@ -59,4 +119,9 @@ func (NopRetryer) GetInitialToken() func(error) error {
|
|||
return nopReleaseToken
|
||||
}
|
||||
|
||||
// GetAttemptToken returns a stub function that does nothing.
|
||||
func (NopRetryer) GetAttemptToken(context.Context) (func(error) error, error) {
|
||||
return nopReleaseToken, nil
|
||||
}
|
||||
|
||||
func nopReleaseToken(error) error { return nil }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
const doubleSpace = " "
|
||||
|
||||
// StripExcessSpaces will rewrite the passed in slice's string values to not
|
||||
// contain muliple side-by-side spaces.
|
||||
// contain multiple side-by-side spaces.
|
||||
func StripExcessSpaces(str string) string {
|
||||
var j, k, l, m, spaces int
|
||||
// Trim trailing spaces
|
||||
|
|
|
|||
|
|
@ -443,7 +443,15 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he
|
|||
} else {
|
||||
canonicalHeaders.WriteString(headers[i])
|
||||
canonicalHeaders.WriteRune(colon)
|
||||
canonicalHeaders.WriteString(strings.Join(signed[headers[i]], ","))
|
||||
// Trim out leading, trailing, and dedup inner spaces from signed header values.
|
||||
values := signed[headers[i]]
|
||||
for j, v := range values {
|
||||
cleanedValue := strings.TrimSpace(v4Internal.StripExcessSpaces(v))
|
||||
canonicalHeaders.WriteString(cleanedValue)
|
||||
if j < len(values)-1 {
|
||||
canonicalHeaders.WriteRune(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
canonicalHeaders.WriteRune('\n')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# v1.14.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options.
|
||||
* **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589)
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.1 (2022-01-28)
|
||||
|
||||
* **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR.
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
|
|||
|
||||
// Sets the endpoint resolving behavior the API Clients will use for making
|
||||
// requests to. Clients default to their own clients this allows overrides
|
||||
// to be specified. The resolveEndpointResolver option is deprecated, but we still need to set it for
|
||||
// backwards compatability on config construction.
|
||||
// to be specified. The resolveEndpointResolver option is deprecated, but
|
||||
// we still need to set it for backwards compatibility on config
|
||||
// construction.
|
||||
resolveEndpointResolver,
|
||||
resolveEndpointResolverWithOptions,
|
||||
|
||||
|
|
@ -54,12 +55,13 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
|
|||
// API client request pipeline middleware.
|
||||
resolveAPIOptions,
|
||||
|
||||
// Resolves the DefaultsMode that should be used by SDK clients.
|
||||
// If this mode is set to AutoDefaultsMode.
|
||||
// Resolves the DefaultsMode that should be used by SDK clients. If this
|
||||
// mode is set to DefaultsModeAuto.
|
||||
//
|
||||
// Comes after HTTPClient and CustomCABundle to ensure the HTTP client is configured if provided before invoking
|
||||
// IMDS if mode is auto. Comes before resolving credentials so that those subsequent clients use the configured
|
||||
// auto mode.
|
||||
// Comes after HTTPClient and CustomCABundle to ensure the HTTP client is
|
||||
// configured if provided before invoking IMDS if mode is auto. Comes
|
||||
// before resolving credentials so that those subsequent clients use the
|
||||
// configured auto mode.
|
||||
resolveDefaultsModeOptions,
|
||||
|
||||
// Sets the resolved credentials the API clients will use for
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type DefaultsModeOptions struct {
|
|||
Mode aws.DefaultsMode
|
||||
|
||||
// The EC2 Instance Metadata Client that should be used when performing environment
|
||||
// discovery when aws.AutoDefaultsMode is set.
|
||||
// discovery when aws.DefaultsModeAuto is set.
|
||||
//
|
||||
// If not specified the SDK will construct a client if the instance metadata service has not been disabled by
|
||||
// the AWS_EC2_METADATA_DISABLED environment variable.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
|
|
@ -65,6 +66,9 @@ const (
|
|||
awsUseFIPSEndpoint = "AWS_USE_FIPS_ENDPOINT"
|
||||
|
||||
awsDefaultMode = "AWS_DEFAULTS_MODE"
|
||||
|
||||
awsRetryMaxAttempts = "AWS_MAX_ATTEMPTS"
|
||||
awsRetryMode = "AWS_RETRY_MODE"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -229,10 +233,21 @@ type EnvConfig struct {
|
|||
// AWS_USE_FIPS_ENDPOINT=true
|
||||
UseFIPSEndpoint aws.FIPSEndpointState
|
||||
|
||||
// Specifies the SDk Defaults Mode used by services.
|
||||
// Specifies the SDK Defaults Mode used by services.
|
||||
//
|
||||
// AWS_DEFAULTS_MODE=standard
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Specifies the maximum number attempts an API client will call an
|
||||
// operation that fails with a retryable error.
|
||||
//
|
||||
// AWS_MAX_ATTEMPTS=3
|
||||
RetryMaxAttempts int
|
||||
|
||||
// Specifies the retry model the API client will be created with.
|
||||
//
|
||||
// aws_retry_mode=standard
|
||||
RetryMode aws.RetryMode
|
||||
}
|
||||
|
||||
// loadEnvConfig reads configuration values from the OS's environment variables.
|
||||
|
|
@ -303,6 +318,13 @@ func NewEnvConfig() (EnvConfig, error) {
|
|||
return cfg, err
|
||||
}
|
||||
|
||||
if err := setIntFromEnvVal(&cfg.RetryMaxAttempts, []string{awsRetryMaxAttempts}); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
if err := setRetryModeFromEnvVal(&cfg.RetryMode, []string{awsRetryMode}); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
|
|
@ -313,6 +335,24 @@ func (c EnvConfig) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool,
|
|||
return c.DefaultsMode, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified,
|
||||
// and not 0.
|
||||
func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
|
||||
if c.RetryMaxAttempts == 0 {
|
||||
return 0, false, nil
|
||||
}
|
||||
return c.RetryMaxAttempts, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMode returns the RetryMode of AWS_RETRY_MODE if was specified, and a
|
||||
// valid value.
|
||||
func (c EnvConfig) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
|
||||
if len(c.RetryMode) == 0 {
|
||||
return "", false, nil
|
||||
}
|
||||
return c.RetryMode, true, nil
|
||||
}
|
||||
|
||||
func setEC2IMDSClientEnableState(state *imds.ClientEnableState, keys []string) {
|
||||
for _, k := range keys {
|
||||
value := os.Getenv(k)
|
||||
|
|
@ -343,6 +383,19 @@ func setDefaultsModeFromEnvVal(mode *aws.DefaultsMode, keys []string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func setRetryModeFromEnvVal(mode *aws.RetryMode, keys []string) (err error) {
|
||||
for _, k := range keys {
|
||||
if value := os.Getenv(k); len(value) > 0 {
|
||||
*mode, err = aws.ParseRetryMode(value)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid %s value, %w", k, err)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setEC2IMDSEndpointMode(mode *imds.EndpointModeState, keys []string) error {
|
||||
for _, k := range keys {
|
||||
value := os.Getenv(k)
|
||||
|
|
@ -468,6 +521,21 @@ func setStringFromEnvVal(dst *string, keys []string) {
|
|||
}
|
||||
}
|
||||
|
||||
func setIntFromEnvVal(dst *int, keys []string) error {
|
||||
for _, k := range keys {
|
||||
if v := os.Getenv(k); len(v) > 0 {
|
||||
i, err := strconv.ParseInt(v, 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid value %s=%s, %w", k, v, err)
|
||||
}
|
||||
*dst = int(i)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func setBoolPtrFromEnvVal(dst **bool, keys []string) error {
|
||||
for _, k := range keys {
|
||||
value := os.Getenv(k)
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package config
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.13.1"
|
||||
const goModuleVersion = "1.14.0"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ import (
|
|||
// LoadOptionsFunc is a type alias for LoadOptions functional option
|
||||
type LoadOptionsFunc func(*LoadOptions) error
|
||||
|
||||
// LoadOptions are discrete set of options that are valid for loading the configuration
|
||||
// LoadOptions are discrete set of options that are valid for loading the
|
||||
// configuration
|
||||
type LoadOptions struct {
|
||||
|
||||
// Region is the region to send requests to.
|
||||
|
|
@ -30,22 +31,36 @@ type LoadOptions struct {
|
|||
// HTTPClient the SDK's API clients will use to invoke HTTP requests.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
// EndpointResolver that can be used to provide or override an endpoint for the given
|
||||
// service and region.
|
||||
// EndpointResolver that can be used to provide or override an endpoint for
|
||||
// the given service and region.
|
||||
//
|
||||
// See the `aws.EndpointResolver` documentation on usage.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptions
|
||||
EndpointResolver aws.EndpointResolver
|
||||
|
||||
// EndpointResolverWithOptions that can be used to provide or override an endpoint for the given
|
||||
// service and region.
|
||||
// EndpointResolverWithOptions that can be used to provide or override an
|
||||
// endpoint for the given service and region.
|
||||
//
|
||||
// See the `aws.EndpointResolverWithOptions` documentation on usage.
|
||||
EndpointResolverWithOptions aws.EndpointResolverWithOptions
|
||||
|
||||
// Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be
|
||||
// retried in case of recoverable failures.
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client
|
||||
// will call an operation that fails with a retryable error.
|
||||
//
|
||||
// This value will only be used if Retryer option is nil.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry model the API client will be created with.
|
||||
//
|
||||
// This value will only be used if Retryer option is nil.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer is a function that provides a Retryer implementation. A Retryer
|
||||
// guides how HTTP requests should be retried in case of recoverable
|
||||
// failures.
|
||||
//
|
||||
// If not nil, RetryMaxAttempts, and RetryMode will be ignored.
|
||||
Retryer func() aws.Retryer
|
||||
|
||||
// APIOptions provides the set of middleware mutations modify how the API
|
||||
|
|
@ -56,45 +71,53 @@ type LoadOptions struct {
|
|||
// Logger writer interface to write logging messages to.
|
||||
Logger logging.Logger
|
||||
|
||||
// ClientLogMode is used to configure the events that will be sent to the configured logger.
|
||||
// This can be used to configure the logging of signing, retries, request, and responses
|
||||
// of the SDK clients.
|
||||
// ClientLogMode is used to configure the events that will be sent to the
|
||||
// configured logger. This can be used to configure the logging of signing,
|
||||
// retries, request, and responses of the SDK clients.
|
||||
//
|
||||
// See the ClientLogMode type documentation for the complete set of logging modes and available
|
||||
// configuration.
|
||||
// See the ClientLogMode type documentation for the complete set of logging
|
||||
// modes and available configuration.
|
||||
ClientLogMode *aws.ClientLogMode
|
||||
|
||||
// SharedConfigProfile is the profile to be used when loading the SharedConfig
|
||||
SharedConfigProfile string
|
||||
|
||||
// SharedConfigFiles is the slice of custom shared config files to use when loading the SharedConfig.
|
||||
// A non-default profile used within config file must have name defined with prefix 'profile '.
|
||||
// eg [profile xyz] indicates a profile with name 'xyz'.
|
||||
// To read more on the format of the config file, please refer the documentation at
|
||||
// SharedConfigFiles is the slice of custom shared config files to use when
|
||||
// loading the SharedConfig. A non-default profile used within config file
|
||||
// must have name defined with prefix 'profile '. eg [profile xyz]
|
||||
// indicates a profile with name 'xyz'. To read more on the format of the
|
||||
// config file, please refer the documentation at
|
||||
// https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-config
|
||||
//
|
||||
// If duplicate profiles are provided within the same, or across multiple shared config files, the next parsed
|
||||
// profile will override only the properties that conflict with the previously defined profile.
|
||||
// Note that if duplicate profiles are provided within the SharedCredentialsFiles and SharedConfigFiles,
|
||||
// the properties defined in shared credentials file take precedence.
|
||||
// If duplicate profiles are provided within the same, or across multiple
|
||||
// shared config files, the next parsed profile will override only the
|
||||
// properties that conflict with the previously defined profile. Note that
|
||||
// if duplicate profiles are provided within the SharedCredentialsFiles and
|
||||
// SharedConfigFiles, the properties defined in shared credentials file
|
||||
// take precedence.
|
||||
SharedConfigFiles []string
|
||||
|
||||
// SharedCredentialsFile is the slice of custom shared credentials files to use when loading the SharedConfig.
|
||||
// The profile name used within credentials file must not prefix 'profile '.
|
||||
// eg [xyz] indicates a profile with name 'xyz'. Profile declared as [profile xyz] will be ignored.
|
||||
// To read more on the format of the credentials file, please refer the documentation at
|
||||
// SharedCredentialsFile is the slice of custom shared credentials files to
|
||||
// use when loading the SharedConfig. The profile name used within
|
||||
// credentials file must not prefix 'profile '. eg [xyz] indicates a
|
||||
// profile with name 'xyz'. Profile declared as [profile xyz] will be
|
||||
// ignored. To read more on the format of the credentials file, please
|
||||
// refer the documentation at
|
||||
// https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-creds
|
||||
//
|
||||
// If duplicate profiles are provided with a same, or across multiple shared credentials files, the next parsed
|
||||
// profile will override only properties that conflict with the previously defined profile.
|
||||
// Note that if duplicate profiles are provided within the SharedCredentialsFiles and SharedConfigFiles,
|
||||
// the properties defined in shared credentials file take precedence.
|
||||
// If duplicate profiles are provided with a same, or across multiple
|
||||
// shared credentials files, the next parsed profile will override only
|
||||
// properties that conflict with the previously defined profile. Note that
|
||||
// if duplicate profiles are provided within the SharedCredentialsFiles and
|
||||
// SharedConfigFiles, the properties defined in shared credentials file
|
||||
// take precedence.
|
||||
SharedCredentialsFiles []string
|
||||
|
||||
// CustomCABundle is CA bundle PEM bytes reader
|
||||
CustomCABundle io.Reader
|
||||
|
||||
// DefaultRegion is the fall back region, used if a region was not resolved from other sources
|
||||
// DefaultRegion is the fall back region, used if a region was not resolved
|
||||
// from other sources
|
||||
DefaultRegion string
|
||||
|
||||
// UseEC2IMDSRegion indicates if SDK should retrieve the region
|
||||
|
|
@ -146,10 +169,12 @@ type LoadOptions struct {
|
|||
// AWS_EC2_METADATA_DISABLED=true
|
||||
EC2IMDSClientEnableState imds.ClientEnableState
|
||||
|
||||
// Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
|
||||
// Specifies the EC2 Instance Metadata Service default endpoint selection
|
||||
// mode (IPv4 or IPv6)
|
||||
EC2IMDSEndpointMode imds.EndpointModeState
|
||||
|
||||
// Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
|
||||
// Specifies the EC2 Instance Metadata Service endpoint to use. If
|
||||
// specified it overrides EC2IMDSEndpointMode.
|
||||
EC2IMDSEndpoint string
|
||||
|
||||
// Specifies that SDK clients must resolve a dual-stack endpoint for
|
||||
|
|
@ -171,6 +196,23 @@ func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, boo
|
|||
return o.DefaultsModeOptions.Mode, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMaxAttempts returns the RetryMaxAttempts if specified in the
|
||||
// LoadOptions and not 0.
|
||||
func (o LoadOptions) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
|
||||
if o.RetryMaxAttempts == 0 {
|
||||
return 0, false, nil
|
||||
}
|
||||
return o.RetryMaxAttempts, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMode returns the RetryMode specified in the LoadOptions.
|
||||
func (o LoadOptions) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
|
||||
if len(o.RetryMode) == 0 {
|
||||
return "", false, nil
|
||||
}
|
||||
return o.RetryMode, true, nil
|
||||
}
|
||||
|
||||
func (o LoadOptions) getDefaultsModeIMDSClient(ctx context.Context) (*imds.Client, bool, error) {
|
||||
if o.DefaultsModeOptions.IMDSClient == nil {
|
||||
return nil, false, nil
|
||||
|
|
@ -559,6 +601,48 @@ func WithAPIOptions(v []func(*middleware.Stack) error) LoadOptionsFunc {
|
|||
}
|
||||
}
|
||||
|
||||
func (o LoadOptions) getRetryMaxAttempts(ctx context.Context) (int, bool, error) {
|
||||
if o.RetryMaxAttempts == 0 {
|
||||
return 0, false, nil
|
||||
}
|
||||
|
||||
return o.RetryMaxAttempts, true, nil
|
||||
}
|
||||
|
||||
// WithRetryMaxAttempts is a helper function to construct functional options that sets
|
||||
// RetryMaxAttempts on LoadOptions. If RetryMaxAttempts is unset, the RetryMaxAttempts value is
|
||||
// ignored. If multiple WithRetryMaxAttempts calls are made, the last call overrides
|
||||
// the previous call values.
|
||||
//
|
||||
// Will be ignored of LoadOptions.Retryer or WithRetryer are used.
|
||||
func WithRetryMaxAttempts(v int) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.RetryMaxAttempts = v
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (o LoadOptions) getRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
|
||||
if o.RetryMode == "" {
|
||||
return "", false, nil
|
||||
}
|
||||
|
||||
return o.RetryMode, true, nil
|
||||
}
|
||||
|
||||
// WithRetryMode is a helper function to construct functional options that sets
|
||||
// RetryMode on LoadOptions. If RetryMode is unset, the RetryMode value is
|
||||
// ignored. If multiple WithRetryMode calls are made, the last call overrides
|
||||
// the previous call values.
|
||||
//
|
||||
// Will be ignored of LoadOptions.Retryer or WithRetryer are used.
|
||||
func WithRetryMode(v aws.RetryMode) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.RetryMode = v
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (o LoadOptions) getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) {
|
||||
if o.Retryer == nil {
|
||||
return nil, false, nil
|
||||
|
|
@ -827,7 +911,7 @@ func (o LoadOptions) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndp
|
|||
// WithDefaultsMode sets the SDK defaults configuration mode to the value provided.
|
||||
//
|
||||
// Zero or more functional options can be provided to provide configuration options for performing
|
||||
// environment discovery when using aws.AutoDefaultsMode.
|
||||
// environment discovery when using aws.DefaultsModeAuto.
|
||||
func WithDefaultsMode(mode aws.DefaultsMode, optFns ...func(options *DefaultsModeOptions)) LoadOptionsFunc {
|
||||
do := DefaultsModeOptions{
|
||||
Mode: mode,
|
||||
|
|
|
|||
|
|
@ -499,3 +499,35 @@ func getDefaultsMode(ctx context.Context, configs configs) (v aws.DefaultsMode,
|
|||
}
|
||||
return v, found, err
|
||||
}
|
||||
|
||||
type retryMaxAttemptsProvider interface {
|
||||
GetRetryMaxAttempts(context.Context) (int, bool, error)
|
||||
}
|
||||
|
||||
func getRetryMaxAttempts(ctx context.Context, configs configs) (v int, found bool, err error) {
|
||||
for _, c := range configs {
|
||||
if p, ok := c.(retryMaxAttemptsProvider); ok {
|
||||
v, found, err = p.GetRetryMaxAttempts(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return v, found, err
|
||||
}
|
||||
|
||||
type retryModeProvider interface {
|
||||
GetRetryMode(context.Context) (aws.RetryMode, bool, error)
|
||||
}
|
||||
|
||||
func getRetryMode(ctx context.Context, configs configs) (v aws.RetryMode, found bool, err error) {
|
||||
for _, c := range configs {
|
||||
if p, ok := c.(retryModeProvider); ok {
|
||||
v, found, err = p.GetRetryMode(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return v, found, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,13 +216,17 @@ func resolveRetryer(ctx context.Context, cfg *aws.Config, configs configs) error
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !found {
|
||||
|
||||
if found {
|
||||
cfg.Retryer = retryer
|
||||
return nil
|
||||
}
|
||||
|
||||
cfg.Retryer = retryer
|
||||
|
||||
return nil
|
||||
// Only load the retry options if a custom retryer has not be specified.
|
||||
if err = resolveRetryMaxAttempts(ctx, cfg, configs); err != nil {
|
||||
return err
|
||||
}
|
||||
return resolveRetryMode(ctx, cfg, configs)
|
||||
}
|
||||
|
||||
func resolveEC2IMDSRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
|
|
@ -275,3 +279,23 @@ func resolveDefaultsModeOptions(ctx context.Context, cfg *aws.Config, configs co
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resolveRetryMaxAttempts(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
maxAttempts, found, err := getRetryMaxAttempts(ctx, configs)
|
||||
if err != nil || !found {
|
||||
return err
|
||||
}
|
||||
cfg.RetryMaxAttempts = maxAttempts
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resolveRetryMode(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
retryMode, found, err := getRetryMode(ctx, configs)
|
||||
if err != nil || !found {
|
||||
return err
|
||||
}
|
||||
cfg.RetryMode = retryMode
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
|
@ -77,6 +80,12 @@ const (
|
|||
useFIPSEndpointKey = "use_fips_endpoint"
|
||||
|
||||
defaultsModeKey = "defaults_mode"
|
||||
|
||||
// Retry options
|
||||
retryMaxAttemptsKey = "max_attempts"
|
||||
retryModeKey = "retry_mode"
|
||||
|
||||
caBundleKey = "ca_bundle"
|
||||
)
|
||||
|
||||
// defaultSharedConfigProfile allows for swapping the default profile for testing
|
||||
|
|
@ -167,12 +176,14 @@ type SharedConfig struct {
|
|||
// s3_use_arn_region=true
|
||||
S3UseARNRegion *bool
|
||||
|
||||
// Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
|
||||
// Specifies the EC2 Instance Metadata Service default endpoint selection
|
||||
// mode (IPv4 or IPv6)
|
||||
//
|
||||
// ec2_metadata_service_endpoint_mode=IPv6
|
||||
EC2IMDSEndpointMode imds.EndpointModeState
|
||||
|
||||
// Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
|
||||
// Specifies the EC2 Instance Metadata Service endpoint to use. If
|
||||
// specified it overrides EC2IMDSEndpointMode.
|
||||
//
|
||||
// ec2_metadata_service_endpoint=http://fd00:ec2::254
|
||||
EC2IMDSEndpoint string
|
||||
|
|
@ -199,6 +210,33 @@ type SharedConfig struct {
|
|||
//
|
||||
// defaults_mode=standard
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Specifies the maximum number attempts an API client will call an
|
||||
// operation that fails with a retryable error.
|
||||
//
|
||||
// max_attempts=3
|
||||
RetryMaxAttempts int
|
||||
|
||||
// Specifies the retry model the API client will be created with.
|
||||
//
|
||||
// retry_mode=standard
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Sets the path to a custom Credentials Authority (CA) Bundle PEM file
|
||||
// that the SDK will use instead of the system's root CA bundle. Only use
|
||||
// this if you want to configure the SDK to use a custom set of CAs.
|
||||
//
|
||||
// Enabling this option will attempt to merge the Transport into the SDK's
|
||||
// HTTP client. If the client's Transport is not a http.Transport an error
|
||||
// will be returned. If the Transport's TLS config is set this option will
|
||||
// cause the SDK to overwrite the Transport's TLS config's RootCAs value.
|
||||
//
|
||||
// Setting a custom HTTPClient in the aws.Config options will override this
|
||||
// setting. To use this option and custom HTTP client, the HTTP client
|
||||
// needs to be provided when creating the config. Not the service client.
|
||||
//
|
||||
// ca_bundle=$HOME/my_custom_ca_bundle
|
||||
CustomCABundle string
|
||||
}
|
||||
|
||||
func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) {
|
||||
|
|
@ -209,6 +247,25 @@ func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMo
|
|||
return c.DefaultsMode, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMaxAttempts returns the maximum number of attempts an API client
|
||||
// created Retryer should attempt an operation call before failing.
|
||||
func (c SharedConfig) GetRetryMaxAttempts(ctx context.Context) (value int, ok bool, err error) {
|
||||
if c.RetryMaxAttempts == 0 {
|
||||
return 0, false, nil
|
||||
}
|
||||
|
||||
return c.RetryMaxAttempts, true, nil
|
||||
}
|
||||
|
||||
// GetRetryMode returns the model the API client should create its Retryer in.
|
||||
func (c SharedConfig) GetRetryMode(ctx context.Context) (value aws.RetryMode, ok bool, err error) {
|
||||
if len(c.RetryMode) == 0 {
|
||||
return "", false, nil
|
||||
}
|
||||
|
||||
return c.RetryMode, true, nil
|
||||
}
|
||||
|
||||
// GetS3UseARNRegion returns if the S3 service should allow ARNs to direct the region
|
||||
// the client's requests are sent to.
|
||||
func (c SharedConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
|
||||
|
|
@ -289,6 +346,19 @@ func (c SharedConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEnd
|
|||
return c.UseFIPSEndpoint, true, nil
|
||||
}
|
||||
|
||||
// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was
|
||||
func (c SharedConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
|
||||
if len(c.CustomCABundle) == 0 {
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadFile(c.CustomCABundle)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
return bytes.NewReader(b), true, nil
|
||||
}
|
||||
|
||||
// loadSharedConfigIgnoreNotExist is an alias for loadSharedConfig with the
|
||||
// addition of ignoring when none of the files exist or when the profile
|
||||
// is not found in any of the files.
|
||||
|
|
@ -609,6 +679,7 @@ func mergeSections(dst, src ini.Sections) error {
|
|||
useDualStackEndpoint,
|
||||
useFIPSEndpointKey,
|
||||
defaultsModeKey,
|
||||
retryModeKey,
|
||||
}
|
||||
for i := range stringKeys {
|
||||
if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil {
|
||||
|
|
@ -616,7 +687,10 @@ func mergeSections(dst, src ini.Sections) error {
|
|||
}
|
||||
}
|
||||
|
||||
intKeys := []string{roleDurationSecondsKey}
|
||||
intKeys := []string{
|
||||
roleDurationSecondsKey,
|
||||
retryMaxAttemptsKey,
|
||||
}
|
||||
for i := range intKeys {
|
||||
if err := mergeIntKey(&srcSection, &dstSection, sectionName, intKeys[i]); err != nil {
|
||||
return err
|
||||
|
|
@ -826,6 +900,15 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
|
|||
return fmt.Errorf("failed to load %s from shared config, %w", defaultsModeKey, err)
|
||||
}
|
||||
|
||||
if err := updateInt(&c.RetryMaxAttempts, section, retryMaxAttemptsKey); err != nil {
|
||||
return fmt.Errorf("failed to load %s from shared config, %w", retryMaxAttemptsKey, err)
|
||||
}
|
||||
if err := updateRetryMode(&c.RetryMode, section, retryModeKey); err != nil {
|
||||
return fmt.Errorf("failed to load %s from shared config, %w", retryModeKey, err)
|
||||
}
|
||||
|
||||
updateString(&c.CustomCABundle, section, caBundleKey)
|
||||
|
||||
// Shared Credentials
|
||||
creds := aws.Credentials{
|
||||
AccessKeyID: section.String(accessKeyIDKey),
|
||||
|
|
@ -852,6 +935,17 @@ func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string)
|
|||
return nil
|
||||
}
|
||||
|
||||
func updateRetryMode(mode *aws.RetryMode, section ini.Section, key string) (err error) {
|
||||
if !section.Has(key) {
|
||||
return nil
|
||||
}
|
||||
value := section.String(key)
|
||||
if *mode, err = aws.ParseRetryMode(value); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func updateEC2MetadataServiceEndpointMode(endpointMode *imds.EndpointModeState, section ini.Section, key string) error {
|
||||
if !section.Has(key) {
|
||||
return nil
|
||||
|
|
@ -1079,6 +1173,24 @@ func updateString(dst *string, section ini.Section, key string) {
|
|||
*dst = section.String(key)
|
||||
}
|
||||
|
||||
// updateInt will only update the dst with the value in the section key, key
|
||||
// is present in the section.
|
||||
//
|
||||
// Down casts the INI integer value from a int64 to an int, which could be
|
||||
// different bit size depending on platform.
|
||||
func updateInt(dst *int, section ini.Section, key string) error {
|
||||
if !section.Has(key) {
|
||||
return nil
|
||||
}
|
||||
if vt, _ := section.ValueType(key); vt != ini.IntegerType {
|
||||
return fmt.Errorf("invalid value %s=%s, expect integer",
|
||||
key, section.String(key))
|
||||
|
||||
}
|
||||
*dst = int(section.Int(key))
|
||||
return nil
|
||||
}
|
||||
|
||||
// updateBool will only update the dst with the value in the section key, key
|
||||
// is present in the section.
|
||||
func updateBool(dst *bool, section ini.Section, key string) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
# v1.9.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575)
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package credentials
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.8.0"
|
||||
const goModuleVersion = "1.9.0"
|
||||
|
|
|
|||
13
vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
generated
vendored
13
vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
generated
vendored
|
|
@ -208,6 +208,18 @@ type AssumeRoleOptions struct {
|
|||
// or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
|
||||
SerialNumber *string
|
||||
|
||||
// The source identity specified by the principal that is calling the AssumeRole
|
||||
// operation. You can require users to specify a source identity when they assume a
|
||||
// role. You do this by using the sts:SourceIdentity condition key in a role trust
|
||||
// policy. You can use source identity information in CloudTrail logs to determine
|
||||
// who took actions with a role. You can use the aws:SourceIdentity condition key
|
||||
// to further control access to Amazon Web Services resources based on the value of
|
||||
// source identity. For more information about using source identity, see Monitor
|
||||
// and control actions taken with assumed roles
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
|
||||
// in the IAM User Guide.
|
||||
SourceIdentity *string
|
||||
|
||||
// Async method of providing MFA token code for assuming an IAM role with MFA.
|
||||
// The value returned by the function will be used as the TokenCode in the Retrieve
|
||||
// call. See StdinTokenProvider for a provider that prompts and reads from stdin.
|
||||
|
|
@ -266,6 +278,7 @@ func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, err
|
|||
RoleArn: aws.String(p.options.RoleARN),
|
||||
RoleSessionName: aws.String(p.options.RoleSessionName),
|
||||
ExternalId: p.options.ExternalID,
|
||||
SourceIdentity: p.options.SourceIdentity,
|
||||
Tags: p.options.Tags,
|
||||
TransitiveTagKeys: p.options.TransitiveTagKeys,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
# v1.11.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package imds
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.0"
|
||||
const goModuleVersion = "1.11.0"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# v1.1.5 (2022-02-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.4 (2022-01-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.1.4"
|
||||
const goModuleVersion = "1.1.5"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
# v2.3.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.2.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
|
|
@ -3,4 +3,4 @@
|
|||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.2.0"
|
||||
const goModuleVersion = "2.3.0"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# v1.3.6 (2022-02-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.5 (2022-01-28)
|
||||
|
||||
* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package ini
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.5"
|
||||
const goModuleVersion = "1.3.6"
|
||||
|
|
|
|||
|
|
@ -1,15 +1,21 @@
|
|||
|
||||
[dependencies]
|
||||
"github.com/aws/smithy-go" = "v1.10.0"
|
||||
"github.com/google/go-cmp" = "v0.5.6"
|
||||
"github.com/aws/smithy-go" = "v1.11.0"
|
||||
"github.com/google/go-cmp" = "v0.5.7"
|
||||
"github.com/jmespath/go-jmespath" = "v0.4.0"
|
||||
"golang.org/x/net" = "v0.0.0-20211209124913-491a49abca63"
|
||||
"golang.org/x/net" = "v0.0.0-20220127200216-cd36cc0744dd"
|
||||
|
||||
[modules]
|
||||
|
||||
[modules."."]
|
||||
metadata_package = "aws"
|
||||
|
||||
[modules."example/service/dynamodb/createTable"]
|
||||
no_tag = true
|
||||
|
||||
[modules."example/service/dynamodb/scanItems"]
|
||||
no_tag = true
|
||||
|
||||
[modules."example/service/s3/listObjects"]
|
||||
no_tag = true
|
||||
|
||||
|
|
@ -19,6 +25,9 @@
|
|||
[modules."feature/ec2/imds/internal/configtesting"]
|
||||
no_tag = true
|
||||
|
||||
[modules."internal/codegen"]
|
||||
no_tag = true
|
||||
|
||||
[modules."internal/configsources/configtesting"]
|
||||
no_tag = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# v1.15.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package ecr
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
|
|
@ -39,14 +38,14 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
|||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveDefaultEndpointConfiguration(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
|
|
@ -91,26 +90,45 @@ type Options struct {
|
|||
// The region to send requests to. (Required)
|
||||
Region string
|
||||
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. If specified in an operation call's functional
|
||||
// options with a value that is different than the constructed client's Options,
|
||||
// the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer.
|
||||
// failures. When nil the API client will use a default retryer. The kind of
|
||||
// default retry created by the API client can be changed with the RetryMode
|
||||
// option.
|
||||
Retryer aws.Retryer
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
|
||||
// to AutoDefaultsMode and is initialized using config.LoadDefaultConfig. You
|
||||
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
|
||||
// should not populate this structure programmatically, or rely on the values here
|
||||
// within your applications.
|
||||
RuntimeEnvironment aws.RuntimeEnvironment
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.AutoDefaultsMode this will store what the resolved
|
||||
// value was at that point in time.
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
clientInitializedOptions map[struct{}]interface{}
|
||||
}
|
||||
|
||||
// WithAPIOptions returns a functional option for setting the Client's APIOptions
|
||||
|
|
@ -139,11 +157,6 @@ func (o Options) Copy() Options {
|
|||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
|
||||
to.clientInitializedOptions = make(map[struct{}]interface{}, len(o.clientInitializedOptions))
|
||||
for k, v := range o.clientInitializedOptions {
|
||||
to.clientInitializedOptions[k] = v
|
||||
}
|
||||
|
||||
return to
|
||||
}
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
|
|
@ -154,6 +167,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
|
|||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttemptOptions(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
|
|
@ -193,6 +208,21 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
|||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
|
|
@ -206,6 +236,8 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
|||
ClientLogMode: cfg.ClientLogMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
|
|
@ -225,18 +257,8 @@ func resolveHTTPClient(o *Options) {
|
|||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
if ok := mode.SetFromString(string(o.DefaultsMode)); !ok {
|
||||
panic(fmt.Errorf("unsupported defaults mode constant %v", mode))
|
||||
}
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
if mode != aws.DefaultsModeLegacy {
|
||||
modeConfig, _ := defaults.GetModeConfiguration(mode)
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
|
|
@ -257,7 +279,37 @@ func resolveRetryer(o *Options) {
|
|||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = retry.NewStandard()
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
|
|
@ -267,6 +319,27 @@ func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
|||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
|
|
@ -305,21 +378,6 @@ func newDefaultV4Signer(o Options) *v4.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_BatchCheckLayerAvailability.go",
|
||||
"api_op_BatchDeleteImage.go",
|
||||
"api_op_BatchGetImage.go",
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package ecr
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.0"
|
||||
const goModuleVersion = "1.15.0"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# v1.12.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package ecrpublic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
|
|
@ -39,14 +38,14 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
|||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveDefaultEndpointConfiguration(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
|
|
@ -91,26 +90,45 @@ type Options struct {
|
|||
// The region to send requests to. (Required)
|
||||
Region string
|
||||
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. If specified in an operation call's functional
|
||||
// options with a value that is different than the constructed client's Options,
|
||||
// the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer.
|
||||
// failures. When nil the API client will use a default retryer. The kind of
|
||||
// default retry created by the API client can be changed with the RetryMode
|
||||
// option.
|
||||
Retryer aws.Retryer
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
|
||||
// to AutoDefaultsMode and is initialized using config.LoadDefaultConfig. You
|
||||
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
|
||||
// should not populate this structure programmatically, or rely on the values here
|
||||
// within your applications.
|
||||
RuntimeEnvironment aws.RuntimeEnvironment
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.AutoDefaultsMode this will store what the resolved
|
||||
// value was at that point in time.
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
clientInitializedOptions map[struct{}]interface{}
|
||||
}
|
||||
|
||||
// WithAPIOptions returns a functional option for setting the Client's APIOptions
|
||||
|
|
@ -139,11 +157,6 @@ func (o Options) Copy() Options {
|
|||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
|
||||
to.clientInitializedOptions = make(map[struct{}]interface{}, len(o.clientInitializedOptions))
|
||||
for k, v := range o.clientInitializedOptions {
|
||||
to.clientInitializedOptions[k] = v
|
||||
}
|
||||
|
||||
return to
|
||||
}
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
|
|
@ -154,6 +167,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
|
|||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttemptOptions(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
|
|
@ -193,6 +208,21 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
|||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
|
|
@ -206,6 +236,8 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
|||
ClientLogMode: cfg.ClientLogMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
|
|
@ -225,18 +257,8 @@ func resolveHTTPClient(o *Options) {
|
|||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
if ok := mode.SetFromString(string(o.DefaultsMode)); !ok {
|
||||
panic(fmt.Errorf("unsupported defaults mode constant %v", mode))
|
||||
}
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
if mode != aws.DefaultsModeLegacy {
|
||||
modeConfig, _ := defaults.GetModeConfiguration(mode)
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
|
|
@ -257,7 +279,37 @@ func resolveRetryer(o *Options) {
|
|||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = retry.NewStandard()
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
|
|
@ -267,6 +319,27 @@ func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
|||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
|
|
@ -305,21 +378,6 @@ func newDefaultV4Signer(o Options) *v4.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_BatchCheckLayerAvailability.go",
|
||||
"api_op_BatchDeleteImage.go",
|
||||
"api_op_CompleteLayerUpload.go",
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package ecrpublic
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.0"
|
||||
const goModuleVersion = "1.12.0"
|
||||
|
|
|
|||
5
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
5
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
|
|
@ -1,3 +1,8 @@
|
|||
# v1.8.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.7.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.7.0"
|
||||
const goModuleVersion = "1.8.0"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# v1.10.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package sso
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
|
|
@ -38,14 +37,14 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
|||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveDefaultEndpointConfiguration(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
|
|
@ -90,26 +89,45 @@ type Options struct {
|
|||
// The region to send requests to. (Required)
|
||||
Region string
|
||||
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. If specified in an operation call's functional
|
||||
// options with a value that is different than the constructed client's Options,
|
||||
// the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer.
|
||||
// failures. When nil the API client will use a default retryer. The kind of
|
||||
// default retry created by the API client can be changed with the RetryMode
|
||||
// option.
|
||||
Retryer aws.Retryer
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
|
||||
// to AutoDefaultsMode and is initialized using config.LoadDefaultConfig. You
|
||||
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
|
||||
// should not populate this structure programmatically, or rely on the values here
|
||||
// within your applications.
|
||||
RuntimeEnvironment aws.RuntimeEnvironment
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.AutoDefaultsMode this will store what the resolved
|
||||
// value was at that point in time.
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
clientInitializedOptions map[struct{}]interface{}
|
||||
}
|
||||
|
||||
// WithAPIOptions returns a functional option for setting the Client's APIOptions
|
||||
|
|
@ -138,11 +156,6 @@ func (o Options) Copy() Options {
|
|||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
|
||||
to.clientInitializedOptions = make(map[struct{}]interface{}, len(o.clientInitializedOptions))
|
||||
for k, v := range o.clientInitializedOptions {
|
||||
to.clientInitializedOptions[k] = v
|
||||
}
|
||||
|
||||
return to
|
||||
}
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
|
|
@ -153,6 +166,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
|
|||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttemptOptions(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
|
|
@ -192,6 +207,21 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
|||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
|
|
@ -205,6 +235,8 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
|||
ClientLogMode: cfg.ClientLogMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
|
|
@ -224,18 +256,8 @@ func resolveHTTPClient(o *Options) {
|
|||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
if ok := mode.SetFromString(string(o.DefaultsMode)); !ok {
|
||||
panic(fmt.Errorf("unsupported defaults mode constant %v", mode))
|
||||
}
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
if mode != aws.DefaultsModeLegacy {
|
||||
modeConfig, _ := defaults.GetModeConfiguration(mode)
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
|
|
@ -256,7 +278,37 @@ func resolveRetryer(o *Options) {
|
|||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = retry.NewStandard()
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
|
|
@ -266,6 +318,27 @@ func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
|||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
|
|
@ -304,21 +377,6 @@ func newDefaultV4Signer(o Options) *v4.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_GetRoleCredentials.go",
|
||||
"api_op_ListAccountRoles.go",
|
||||
"api_op_ListAccounts.go",
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package sso
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.9.0"
|
||||
const goModuleVersion = "1.10.0"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# v1.15.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package sts
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
|
|
@ -41,14 +40,14 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
|||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveDefaultEndpointConfiguration(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
|
|
@ -93,26 +92,45 @@ type Options struct {
|
|||
// The region to send requests to. (Required)
|
||||
Region string
|
||||
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. If specified in an operation call's functional
|
||||
// options with a value that is different than the constructed client's Options,
|
||||
// the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer.
|
||||
// failures. When nil the API client will use a default retryer. The kind of
|
||||
// default retry created by the API client can be changed with the RetryMode
|
||||
// option.
|
||||
Retryer aws.Retryer
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
|
||||
// to AutoDefaultsMode and is initialized using config.LoadDefaultConfig. You
|
||||
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
|
||||
// should not populate this structure programmatically, or rely on the values here
|
||||
// within your applications.
|
||||
RuntimeEnvironment aws.RuntimeEnvironment
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.AutoDefaultsMode this will store what the resolved
|
||||
// value was at that point in time.
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
clientInitializedOptions map[struct{}]interface{}
|
||||
}
|
||||
|
||||
// WithAPIOptions returns a functional option for setting the Client's APIOptions
|
||||
|
|
@ -141,11 +159,6 @@ func (o Options) Copy() Options {
|
|||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
|
||||
to.clientInitializedOptions = make(map[struct{}]interface{}, len(o.clientInitializedOptions))
|
||||
for k, v := range o.clientInitializedOptions {
|
||||
to.clientInitializedOptions[k] = v
|
||||
}
|
||||
|
||||
return to
|
||||
}
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
|
|
@ -156,6 +169,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
|
|||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttemptOptions(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
|
|
@ -195,6 +210,21 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
|||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
|
|
@ -208,6 +238,8 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
|||
ClientLogMode: cfg.ClientLogMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
|
|
@ -227,18 +259,8 @@ func resolveHTTPClient(o *Options) {
|
|||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
if ok := mode.SetFromString(string(o.DefaultsMode)); !ok {
|
||||
panic(fmt.Errorf("unsupported defaults mode constant %v", mode))
|
||||
}
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
if mode != aws.DefaultsModeLegacy {
|
||||
modeConfig, _ := defaults.GetModeConfiguration(mode)
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
|
|
@ -259,7 +281,37 @@ func resolveRetryer(o *Options) {
|
|||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = retry.NewStandard()
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
|
|
@ -269,6 +321,27 @@ func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
|||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
|
|
@ -307,21 +380,6 @@ func newDefaultV4Signer(o Options) *v4.Signer {
|
|||
})
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_AssumeRole.go",
|
||||
"api_op_AssumeRoleWithSAML.go",
|
||||
"api_op_AssumeRoleWithWebIdentity.go",
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package sts
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.0"
|
||||
const goModuleVersion = "1.15.0"
|
||||
|
|
|
|||
|
|
@ -814,61 +814,6 @@ var awsPartition = partition{
|
|||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"amplifyuibuilder": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"api.detective": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{
|
||||
|
|
@ -1724,147 +1669,6 @@ var awsPartition = partition{
|
|||
},
|
||||
},
|
||||
},
|
||||
"api.tunneling.iot": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
defaultKey{
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
|
||||
},
|
||||
},
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "fips-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-east-2",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-east-2",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-west-2",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
|
||||
},
|
||||
},
|
||||
},
|
||||
"apigateway": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
|
|
@ -10013,9 +9817,6 @@ var awsPartition = partition{
|
|||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
|
|
@ -13746,9 +13547,6 @@ var awsPartition = partition{
|
|||
},
|
||||
"mq": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "af-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoint{},
|
||||
|
|
@ -22159,16 +21957,6 @@ var awscnPartition = partition{
|
|||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"api.tunneling.iot": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "cn-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "cn-northwest-1",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"apigateway": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
|
|
@ -23677,14 +23465,6 @@ var awsusgovPartition = partition{
|
|||
},
|
||||
},
|
||||
"acm": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
defaultKey{
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "acm.{region}.{dnsSuffix}",
|
||||
},
|
||||
},
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
|
|
@ -23975,54 +23755,6 @@ var awsusgovPartition = partition{
|
|||
},
|
||||
},
|
||||
},
|
||||
"api.tunneling.iot": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
defaultKey{
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
|
||||
},
|
||||
},
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
|
||||
},
|
||||
},
|
||||
},
|
||||
"apigateway": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
|
|
@ -24959,14 +24691,6 @@ var awsusgovPartition = partition{
|
|||
},
|
||||
},
|
||||
"ec2": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
defaultKey{
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "ec2.{region}.{dnsSuffix}",
|
||||
},
|
||||
},
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ package aws
|
|||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.43.7"
|
||||
const SDKVersion = "1.42.52"
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package eventstreamapi
|
||||
|
||||
import "github.com/aws/aws-sdk-go/aws/request"
|
||||
|
||||
// This is a no-op for Go 1.18 and above.
|
||||
func ApplyHTTPTransportFixes(r *request.Request) {
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
//go:build !go1.18
|
||||
// +build !go1.18
|
||||
|
||||
package eventstreamapi
|
||||
|
||||
import "github.com/aws/aws-sdk-go/aws/request"
|
||||
|
||||
// ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event
|
||||
// stream functionality. Go 1.15 through 1.17 HTTP client could hang forever
|
||||
// when an HTTP/2 connection failed with an non-200 status code and err. Using
|
||||
// Expect 100-Continue, allows the HTTP client to gracefully handle the non-200
|
||||
// status code, and close the connection.
|
||||
//
|
||||
// This is a no-op for Go 1.18 and above.
|
||||
func ApplyHTTPTransportFixes(r *request.Request) {
|
||||
r.Handlers.Sign.PushBack(func(r *request.Request) {
|
||||
r.HTTPRequest.Header.Set("Expect", "100-Continue")
|
||||
})
|
||||
}
|
||||
|
|
@ -272,9 +272,6 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
|
|||
|
||||
switch value := v.Interface().(type) {
|
||||
case string:
|
||||
if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" {
|
||||
value = base64.StdEncoding.EncodeToString([]byte(value))
|
||||
}
|
||||
str = value
|
||||
case []byte:
|
||||
str = base64.StdEncoding.EncodeToString(value)
|
||||
|
|
@ -309,6 +306,5 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
|
|||
err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type())
|
||||
return "", err
|
||||
}
|
||||
|
||||
return str, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,13 +204,6 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro
|
|||
|
||||
switch v.Interface().(type) {
|
||||
case *string:
|
||||
if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" {
|
||||
b, err := base64.StdEncoding.DecodeString(header)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to decode JSONValue, %v", err)
|
||||
}
|
||||
header = string(b)
|
||||
}
|
||||
v.Set(reflect.ValueOf(&header))
|
||||
case []byte:
|
||||
b, err := base64.StdEncoding.DecodeString(header)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -244,10 +244,6 @@ type S3API interface {
|
|||
GetObjectAclWithContext(aws.Context, *s3.GetObjectAclInput, ...request.Option) (*s3.GetObjectAclOutput, error)
|
||||
GetObjectAclRequest(*s3.GetObjectAclInput) (*request.Request, *s3.GetObjectAclOutput)
|
||||
|
||||
GetObjectAttributes(*s3.GetObjectAttributesInput) (*s3.GetObjectAttributesOutput, error)
|
||||
GetObjectAttributesWithContext(aws.Context, *s3.GetObjectAttributesInput, ...request.Option) (*s3.GetObjectAttributesOutput, error)
|
||||
GetObjectAttributesRequest(*s3.GetObjectAttributesInput) (*request.Request, *s3.GetObjectAttributesOutput)
|
||||
|
||||
GetObjectLegalHold(*s3.GetObjectLegalHoldInput) (*s3.GetObjectLegalHoldOutput, error)
|
||||
GetObjectLegalHoldWithContext(aws.Context, *s3.GetObjectLegalHoldInput, ...request.Option) (*s3.GetObjectLegalHoldOutput, error)
|
||||
GetObjectLegalHoldRequest(*s3.GetObjectLegalHoldInput) (*request.Request, *s3.GetObjectLegalHoldOutput)
|
||||
|
|
|
|||
|
|
@ -124,14 +124,6 @@ func WithUploaderRequestOptions(opts ...request.Option) func(*Uploader) {
|
|||
// The Uploader structure that calls Upload(). It is safe to call Upload()
|
||||
// on this structure for multiple objects and across concurrent goroutines.
|
||||
// Mutating the Uploader's properties is not safe to be done concurrently.
|
||||
//
|
||||
// The ContentMD5 member for pre-computed MD5 checksums will be ignored for
|
||||
// multipart uploads. Objects that will be uploaded in a single part, the
|
||||
// ContentMD5 will be used.
|
||||
//
|
||||
// The Checksum members for pre-computed checksums will be ignored for
|
||||
// multipart uploads. Objects that will be uploaded in a single part, will
|
||||
// include the checksum member in the request.
|
||||
type Uploader struct {
|
||||
// The buffer size (in bytes) to use when buffering data into chunks and
|
||||
// sending them as parts to S3. The minimum allowed part size is 5MB, and
|
||||
|
|
|
|||
|
|
@ -11,14 +11,6 @@ import (
|
|||
// to an object in an Amazon S3 bucket. This type is similar to the s3
|
||||
// package's PutObjectInput with the exception that the Body member is an
|
||||
// io.Reader instead of an io.ReadSeeker.
|
||||
//
|
||||
// The ContentMD5 member for pre-computed MD5 checksums will be ignored for
|
||||
// multipart uploads. Objects that will be uploaded in a single part, the
|
||||
// ContentMD5 will be used.
|
||||
//
|
||||
// The Checksum members for pre-computed checksums will be ignored for
|
||||
// multipart uploads. Objects that will be uploaded in a single part, will
|
||||
// include the checksum member in the request.
|
||||
type UploadInput struct {
|
||||
_ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
|
||||
|
||||
|
|
@ -43,9 +35,9 @@ type UploadInput struct {
|
|||
// When using this action with Amazon S3 on Outposts, you must direct requests
|
||||
// to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
|
||||
// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
|
||||
// using this action with S3 on Outposts through the Amazon Web Services SDKs,
|
||||
// using this action using S3 on Outposts through the Amazon Web Services SDKs,
|
||||
// you provide the Outposts bucket ARN in place of the bucket name. For more
|
||||
// information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
|
||||
// information about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Bucket is a required field
|
||||
|
|
@ -65,51 +57,6 @@ type UploadInput struct {
|
|||
// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
|
||||
CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
|
||||
|
||||
// Indicates the algorithm used to create the checksum for the object when using
|
||||
// the SDK. This header will not provide any additional functionality if not
|
||||
// using the SDK. When sending this header, there must be a corresponding x-amz-checksum
|
||||
// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
|
||||
// the HTTP status code 400 Bad Request. For more information, see Checking
|
||||
// object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
|
||||
// parameter.
|
||||
//
|
||||
// The AWS SDK for Go v1 does not support automatic computing request payload
|
||||
// checksum. This feature is available in the AWS SDK for Go v2. If a value
|
||||
// is specified for this parameter, the matching algorithm's checksum member
|
||||
// must be populated with the algorithm's checksum of the request payload.
|
||||
ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
|
||||
|
||||
// This header can be used as a data integrity check to verify that the data
|
||||
// received is the same data that was originally sent. This header specifies
|
||||
// the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
|
||||
// see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
|
||||
|
||||
// This header can be used as a data integrity check to verify that the data
|
||||
// received is the same data that was originally sent. This header specifies
|
||||
// the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
|
||||
// see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
|
||||
|
||||
// This header can be used as a data integrity check to verify that the data
|
||||
// received is the same data that was originally sent. This header specifies
|
||||
// the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
|
||||
// see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
|
||||
|
||||
// This header can be used as a data integrity check to verify that the data
|
||||
// received is the same data that was originally sent. This header specifies
|
||||
// the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
|
||||
// see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
|
||||
|
||||
// Specifies presentational information for the object. For more information,
|
||||
// see http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1).
|
||||
ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
|
||||
|
|
@ -129,9 +76,6 @@ type UploadInput struct {
|
|||
// it is optional, we recommend using the Content-MD5 mechanism as an end-to-end
|
||||
// integrity check. For more information about REST request authentication,
|
||||
// see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
|
||||
//
|
||||
// If the ContentMD5 is provided for a multipart upload, it will be ignored.
|
||||
// Objects that will be uploaded in a single part, the ContentMD5 will be used.
|
||||
ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
|
||||
|
||||
// A standard MIME type describing the format of the contents. For more information,
|
||||
|
|
@ -139,8 +83,8 @@ type UploadInput struct {
|
|||
ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
|
||||
|
||||
// The account ID of the expected bucket owner. If the bucket is owned by a
|
||||
// different account, the request fails with the HTTP status code 403 Forbidden
|
||||
// (access denied).
|
||||
// different account, the request will fail with an HTTP 403 (Access Denied)
|
||||
// error.
|
||||
ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
|
||||
|
||||
// The date and time at which the object is no longer cacheable. For more information,
|
||||
|
|
@ -188,8 +132,8 @@ type UploadInput struct {
|
|||
|
||||
// Confirms that the requester knows that they will be charged for the request.
|
||||
// Bucket owners need not specify this parameter in their requests. For information
|
||||
// about downloading objects from Requester Pays buckets, see Downloading Objects
|
||||
// in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
|
||||
// about downloading objects from requester pays buckets, see Downloading Objects
|
||||
// in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
# Release (v1.11.0)
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/smithy-go`: v1.11.0
|
||||
* **Feature**: Updates deserialization of header list to supported quoted strings
|
||||
|
||||
# Release (v1.10.0)
|
||||
|
||||
## Module Highlights
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
package smithy
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.0"
|
||||
const goModuleVersion = "1.11.0"
|
||||
|
|
|
|||
|
|
@ -2,48 +2,120 @@ package http
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
func splitHeaderListValues(vs []string, splitFn func(string) ([]string, error)) ([]string, error) {
|
||||
for i := 0; i < len(vs); i++ {
|
||||
if len(vs[i]) == 0 {
|
||||
continue
|
||||
}
|
||||
values := make([]string, 0, len(vs))
|
||||
|
||||
for i := 0; i < len(vs); i++ {
|
||||
parts, err := splitFn(vs[i])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(parts) < 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
tmp := make([]string, len(vs)+len(parts)-1)
|
||||
copy(tmp, vs[:i])
|
||||
|
||||
for j, p := range parts {
|
||||
tmp[i+j] = strings.TrimSpace(p)
|
||||
}
|
||||
|
||||
copy(tmp[i+len(parts):], vs[i+1:])
|
||||
|
||||
vs = tmp
|
||||
i += len(parts) - 1
|
||||
values = append(values, parts...)
|
||||
}
|
||||
|
||||
return vs, nil
|
||||
return values, nil
|
||||
}
|
||||
|
||||
// SplitHeaderListValues attempts to split the elements of the slice by commas,
|
||||
// and return a list of all values separated. Returns error if unable to
|
||||
// separate the values.
|
||||
func SplitHeaderListValues(vs []string) ([]string, error) {
|
||||
return splitHeaderListValues(vs, commaSplit)
|
||||
return splitHeaderListValues(vs, quotedCommaSplit)
|
||||
}
|
||||
|
||||
func commaSplit(v string) ([]string, error) {
|
||||
return strings.Split(v, ","), nil
|
||||
func quotedCommaSplit(v string) (parts []string, err error) {
|
||||
v = strings.TrimSpace(v)
|
||||
|
||||
expectMore := true
|
||||
for i := 0; i < len(v); i++ {
|
||||
if unicode.IsSpace(rune(v[i])) {
|
||||
continue
|
||||
}
|
||||
expectMore = false
|
||||
|
||||
// leading space in part is ignored.
|
||||
// Start of value must be non-space, or quote.
|
||||
//
|
||||
// - If quote, enter quoted mode, find next non-escaped quote to
|
||||
// terminate the value.
|
||||
// - Otherwise, find next comma to terminate value.
|
||||
|
||||
remaining := v[i:]
|
||||
|
||||
var value string
|
||||
var valueLen int
|
||||
if remaining[0] == '"' {
|
||||
//------------------------------
|
||||
// Quoted value
|
||||
//------------------------------
|
||||
var j int
|
||||
var skipQuote bool
|
||||
for j += 1; j < len(remaining); j++ {
|
||||
if remaining[j] == '\\' || (remaining[j] != '\\' && skipQuote) {
|
||||
skipQuote = !skipQuote
|
||||
continue
|
||||
}
|
||||
if remaining[j] == '"' {
|
||||
break
|
||||
}
|
||||
}
|
||||
if j == len(remaining) || j == 1 {
|
||||
return nil, fmt.Errorf("value %v missing closing double quote",
|
||||
remaining)
|
||||
}
|
||||
valueLen = j + 1
|
||||
|
||||
tail := remaining[valueLen:]
|
||||
var k int
|
||||
for ; k < len(tail); k++ {
|
||||
if !unicode.IsSpace(rune(tail[k])) && tail[k] != ',' {
|
||||
return nil, fmt.Errorf("value %v has non-space trailing characters",
|
||||
remaining)
|
||||
}
|
||||
if tail[k] == ',' {
|
||||
expectMore = true
|
||||
break
|
||||
}
|
||||
}
|
||||
value = remaining[:valueLen]
|
||||
value, err = strconv.Unquote(value)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to unquote value %v, %w", value, err)
|
||||
}
|
||||
|
||||
// Pad valueLen to include trailing space(s) so `i` is updated correctly.
|
||||
valueLen += k
|
||||
|
||||
} else {
|
||||
//------------------------------
|
||||
// Unquoted value
|
||||
//------------------------------
|
||||
|
||||
// Index of the next comma is the length of the value, or end of string.
|
||||
valueLen = strings.Index(remaining, ",")
|
||||
if valueLen != -1 {
|
||||
expectMore = true
|
||||
} else {
|
||||
valueLen = len(remaining)
|
||||
}
|
||||
value = strings.TrimSpace(remaining[:valueLen])
|
||||
}
|
||||
|
||||
i += valueLen
|
||||
parts = append(parts, value)
|
||||
|
||||
}
|
||||
|
||||
if expectMore {
|
||||
parts = append(parts, "")
|
||||
}
|
||||
|
||||
return parts, nil
|
||||
}
|
||||
|
||||
// SplitHTTPDateTimestampHeaderListValues attempts to split the HTTP-Date
|
||||
|
|
@ -56,10 +128,10 @@ func SplitHTTPDateTimestampHeaderListValues(vs []string) ([]string, error) {
|
|||
}
|
||||
|
||||
func splitHTTPDateHeaderValue(v string) ([]string, error) {
|
||||
if n := strings.Count(v, ","); n == 1 {
|
||||
// Skip values with only a single HTTPDate value
|
||||
return nil, nil
|
||||
} else if n == 0 || n%2 == 0 {
|
||||
if n := strings.Count(v, ","); n <= 1 {
|
||||
// Nothing to do if only contains a no, or single HTTPDate value
|
||||
return []string{v}, nil
|
||||
} else if n%2 == 0 {
|
||||
return nil, fmt.Errorf("invalid timestamp HTTPDate header comma separations, %q", v)
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +143,7 @@ func splitHTTPDateHeaderValue(v string) ([]string, error) {
|
|||
if v[i] == ',' {
|
||||
if doSplit {
|
||||
doSplit = false
|
||||
parts = append(parts, v[j:i])
|
||||
parts = append(parts, strings.TrimSpace(v[j:i]))
|
||||
j = i + 1
|
||||
} else {
|
||||
// Skip the first comma in the timestamp value since that
|
||||
|
|
@ -82,8 +154,9 @@ func splitHTTPDateHeaderValue(v string) ([]string, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Add final part
|
||||
if j < len(v) {
|
||||
parts = append(parts, v[j:])
|
||||
parts = append(parts, strings.TrimSpace(v[j:]))
|
||||
}
|
||||
|
||||
return parts, nil
|
||||
|
|
|
|||
|
|
@ -33,18 +33,28 @@ type ECRHelper struct {
|
|||
|
||||
type Option func(*ECRHelper)
|
||||
|
||||
// WithClientFactory sets the ClientFactory used to make API requests.
|
||||
func WithClientFactory(clientFactory api.ClientFactory) Option {
|
||||
return func(e *ECRHelper) {
|
||||
e.clientFactory = clientFactory
|
||||
}
|
||||
}
|
||||
|
||||
func WithLogOutput(w io.Writer) Option {
|
||||
// WithLogger sets a new logger instance that writes to the given writer,
|
||||
// instead of the default writer which writes to stderr.
|
||||
//
|
||||
// This can be useful if callers want to redirect logging emitted by this tool
|
||||
// to another location.
|
||||
func WithLogger(w io.Writer) Option {
|
||||
return func(e *ECRHelper) {
|
||||
e.logger.Out = w
|
||||
logger := logrus.New()
|
||||
logger.Out = w
|
||||
e.logger = logger
|
||||
}
|
||||
}
|
||||
|
||||
// NewECRHelper returns a new ECRHelper with the given options to override
|
||||
// default behavior.
|
||||
func NewECRHelper(opts ...Option) *ECRHelper {
|
||||
e := &ECRHelper{
|
||||
clientFactory: api.DefaultClientFactory{},
|
||||
|
|
|
|||
|
|
@ -194,3 +194,26 @@ func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
|||
// identical so pass *IfreqData directly.
|
||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||
}
|
||||
|
||||
// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
|
||||
// existing KCM socket, returning a structure containing the file descriptor of
|
||||
// the new socket.
|
||||
func IoctlKCMClone(fd int) (*KCMClone, error) {
|
||||
var info KCMClone
|
||||
if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &info, nil
|
||||
}
|
||||
|
||||
// IoctlKCMAttach attaches a TCP socket and associated BPF program file
|
||||
// descriptor to a multiplexor.
|
||||
func IoctlKCMAttach(fd int, info KCMAttach) error {
|
||||
return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
||||
// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
|
||||
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
|
||||
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ struct ltchars {
|
|||
#include <linux/bpf.h>
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/error.h>
|
||||
#include <linux/can/netlink.h>
|
||||
#include <linux/can/raw.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/cryptouser.h>
|
||||
|
|
@ -231,6 +232,7 @@ struct ltchars {
|
|||
#include <linux/if_packet.h>
|
||||
#include <linux/if_xdp.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/kcm.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/landlock.h>
|
||||
|
|
@ -503,6 +505,7 @@ ccflags="$@"
|
|||
$2 ~ /^O?XTABS$/ ||
|
||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||
$2 ~ /^IN_/ ||
|
||||
$2 ~ /^KCM/ ||
|
||||
$2 ~ /^LANDLOCK_/ ||
|
||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||
|
|
|
|||
|
|
@ -250,6 +250,13 @@ func Getwd() (wd string, err error) {
|
|||
if n < 1 || n > len(buf) || buf[n-1] != 0 {
|
||||
return "", EINVAL
|
||||
}
|
||||
// In some cases, Linux can return a path that starts with the
|
||||
// "(unreachable)" prefix, which can potentially be a valid relative
|
||||
// path. To work around that, return ENOENT if path is not absolute.
|
||||
if buf[0] != '/' {
|
||||
return "", ENOENT
|
||||
}
|
||||
|
||||
return string(buf[0 : n-1]), nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,14 +173,6 @@ const (
|
|||
_SENDMMSG = 20
|
||||
)
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
|
||||
if e != 0 {
|
||||
err = e
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
if e != 0 {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
return newoffset, nil
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ import (
|
|||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ package unix
|
|||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -145,15 +145,6 @@ const (
|
|||
netSendMMsg = 20
|
||||
)
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(fd), nil
|
||||
}
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
|
||||
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ package unix
|
|||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
|||
|
|
@ -260,6 +260,17 @@ const (
|
|||
BUS_USB = 0x3
|
||||
BUS_VIRTUAL = 0x6
|
||||
CAN_BCM = 0x2
|
||||
CAN_CTRLMODE_3_SAMPLES = 0x4
|
||||
CAN_CTRLMODE_BERR_REPORTING = 0x10
|
||||
CAN_CTRLMODE_CC_LEN8_DLC = 0x100
|
||||
CAN_CTRLMODE_FD = 0x20
|
||||
CAN_CTRLMODE_FD_NON_ISO = 0x80
|
||||
CAN_CTRLMODE_LISTENONLY = 0x2
|
||||
CAN_CTRLMODE_LOOPBACK = 0x1
|
||||
CAN_CTRLMODE_ONE_SHOT = 0x8
|
||||
CAN_CTRLMODE_PRESUME_ACK = 0x40
|
||||
CAN_CTRLMODE_TDC_AUTO = 0x200
|
||||
CAN_CTRLMODE_TDC_MANUAL = 0x400
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
|
|
@ -337,6 +348,7 @@ const (
|
|||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TERMINATION_DISABLED = 0x0
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
|
|
@ -1274,6 +1286,8 @@ const (
|
|||
IUTF8 = 0x4000
|
||||
IXANY = 0x800
|
||||
JFFS2_SUPER_MAGIC = 0x72b6
|
||||
KCMPROTO_CONNECTED = 0x0
|
||||
KCM_RECV_DISABLE = 0x1
|
||||
KEXEC_ARCH_386 = 0x30000
|
||||
KEXEC_ARCH_68K = 0x40000
|
||||
KEXEC_ARCH_AARCH64 = 0xb70000
|
||||
|
|
@ -2446,6 +2460,9 @@ const (
|
|||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCKCMATTACH = 0x89e0
|
||||
SIOCKCMCLONE = 0x89e2
|
||||
SIOCKCMUNATTACH = 0x89e1
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
|
|
|
|||
|
|
@ -444,17 +444,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -46,17 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -389,17 +389,6 @@ func Truncate(path string, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -409,17 +409,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
|
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue