-
Notifications
You must be signed in to change notification settings - Fork 193
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
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 `Config` object which is provided to the service builder constructor via `PokemonService::builder(config: Config)`. 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 `Config` object, possibly exposing a method to pass in any runtime arguments needed to configure the middleware.
- Loading branch information
1 parent
08a533f
commit decd5a4
Showing
5 changed files
with
250 additions
and
59 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
Oops, something went wrong.