配置 aws-sdk-go http 客户端连接池?

Configuring the aws-sdk-go http client connection pool?

我在查找有关 http 客户端连接池的信息时遇到问题 - 专门针对 S3。

我已经 grep 了代码,但没有任何乐趣。不胜感激。

正如我通过查看代码所怀疑的那样,Go SDK 不支持类似于 Java SDK 的客户端连接池。来自 AWS 支持:

I've heard back from our SDK team. They advise that concurrency management of the type that you're looking for is not provided out-of-the-box in our SDKs. You'll need to design and implement your own solution. For the Go SDK specifically, that means a semaphore pattern. Some links that may be helpful on that subject:

https://medium.com/@deckarep/gos-extended-concurrency-semaphores-part-1-5eeabfa351ce https://aws.amazon.com/blogs/developer/context-pattern-added-to-the-aws-sdk-for-go/

The techniques described there should allow you to control the number of concurrent connections. I hope that helps. Please let us know if you have any additional questions.