-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build services with a derived configuration object (#3095)
This is a pared-down version of #2809. This is the code-generated version of the david-perez/smithy-rs-service-config#2 POC. This introduces a code-generated `PokemonServiceConfig` object which is provided to the service builder constructor via `PokemonService::builder(config: PokemonServiceConfig)`. This will displace the current `builder_without_plugins` and `builder_with_plugins`, deprecating them. We will eventually remove them. The motivation is to have a single place where to register plugins and layers. Smithy traits can leverage this object to inject methods that can apply plugins and layers. For example, an `@authorization` trait implementer could vend a smithy-rs decorator that pre-applied an authorization plugin inside the `${serviceName}Config` object, possibly exposing a method to pass in any runtime arguments needed to configure the middleware. ## Checklist - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
- Loading branch information
1 parent
06e265d
commit 53dcff3
Showing
16 changed files
with
430 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.