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
Request IDs #2054
Request IDs #2054
Conversation
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
...time/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-connect-info.rs
Outdated
Show resolved
Hide resolved
} | ||
|
||
pub struct ClientRequestIdProviderLayer<'a> { | ||
possible_headers: &'a [&'a str], |
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.
Is there ever a chance where we use less than 'static
here?
pub struct MissingClientRequestId; | ||
|
||
impl ClientRequestId { | ||
pub fn new(id: Box<str>) -> Self { |
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.
Perhaps lots of From
implementations instead of this new
- e.g. From<Box<str>>
, From<String>
and From<Cow<'static, str>>
.
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.
What about pub fn new(id: impl Into<&str>)
or something along the lines?
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
...time/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-connect-info.rs
Outdated
Show resolved
Hide resolved
A new generated diff is ready to view.
A new doc preview is ready to view. |
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
...time/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-connect-info.rs
Outdated
Show resolved
Hide resolved
This reverts commit 19bf72b.
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Implement RFC 24: Request IDs in business logic
Testing
From the example:
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.