Open
Description
Right now, there are various options exposed on the generated client such as timeout and retries. Sometimes it would be nice to set these options different for a single request. To do that now, it requires either creating a new client, or temporarily setting the options on the existing client (which doesn't play well if that client is shared across go-routines, for example).
Two example patterns of ways to implement this:
- aws-sdk-go-v2 adds a var-args for modifying the client options to every method: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb#Client.GetItem , see https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#OverrideClientOptionsForOperation
- aws-sdk-go has it where you can first create a request and then execute the request, e.g. https://pkg.go.dev/github.com/aws/[email protected]/service/dynamodb#DynamoDB.GetItemRequest, and this exposes the Request it self to be modified before execution.
Metadata
Metadata
Assignees
Labels
No labels