Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK's Request type is too generic #80

Closed
jasdel opened this issue Jan 2, 2018 · 1 comment
Closed

SDK's Request type is too generic #80

jasdel opened this issue Jan 2, 2018 · 1 comment

Comments

@jasdel
Copy link
Contributor

jasdel commented Jan 2, 2018

The SDK's aws.Request type is too generic and does too much. We want to break this apart. Specifically decouple the http.Request/Response from the the SDK's request structure. In v1 SDK having the HTTP request built early on made it difficult to extend and modify how the SDK handled requests. e.g HTTP Body value couldn't be fixed to be set to nil when there wasn't actually a request body.

One way this could be done is to abstract the Transport from the SDK's API request. This potentially could manifest as a Sender, or Transport interface that all SDK's service clients have as a member. This type could be responsible for the protocol (un)marshaling, and round tripping the request over the wire. This pattern would more easily allow the SDK to support other transport protocols. Such as TCP and MQTT.

@Skarlso
Copy link

Skarlso commented Jan 3, 2018

@jasdel You are talking about this guy, right? Request.go.

I have to read through it completely yet to fully grasp what it does.

If I could rig up the response that comes back for a request that I also have canned, that would be better. Because I might be running different scenarios which are dependent on some environment change in AWS. Like a CloudFormation stack which was supposed to be running but is instead Rolled back.

Could you elaborate how we would be able to extend the SDK by using the Sender interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants