-
Notifications
You must be signed in to change notification settings - Fork 187
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
Consolidate fluent client builder implementations #668
Consolidate fluent client builder implementations #668
Conversation
It looks like this PR makes passing around an individual operation's fluent builder more difficult. To illustrate how, here is a before/after snapshot from the Dynamo movies example: Before: fn create_table(
client: &Client,
table_name: &str,
) -> CreateTable { After: fn create_table(
client: &Client,
table_name: &str,
) -> CreateTable<DynConnector, AwsMiddleware, Standard> { The PR currently has the clients arranged as follows:
I think we will need create a
@rcoh - What are your thoughts on this? |
can we conditionally generate default type parameters for the AWS case? Maybe we can have a data class DefaultTypes(connector: RuntimeType?, middleware: RuntimeType?, retry: RuntimeType?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is huge and sorely needed. You can also undo my refactoring to create FluentClientCore
when this lands.
That's a really good idea, I like it! Will give it a try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one cleanup inline
|
||
val AwsMiddleware = RuntimeType("AwsMiddleware", awsHyperDep, "aws_hyper") | ||
val DynConnector = RuntimeType("DynConnector", smithyClientDep, "smithy_client::erase") | ||
val Standard = RuntimeType("Standard", smithyClientDep, "smithy_client::retry") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: probably clearer to have this be the retry module so that it's #{retry}::Standard
which is much clearer than just Standard
Motivation and Context
The AWS fluent client implementation is currently separate from the generic Smithy fluent client implementation. The aim of this PR is to consolidate them so that changes made to one take effect in the other.
Testing
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.