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
Please register or sign in to comment