-
Notifications
You must be signed in to change notification settings - Fork 193
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
Implement core Smithy endpoint support #183
Conversation
This commit adds `Endpoint` to smithy-http & records our design decisions in `endpoint.md`. This provides support for the endpoint trait in Smithy. A design for endpoint discovery is proposed but is not currently implemented.
design/src/endpoint.md
Outdated
// depending on the duration of endpoint expiration, this may be spawned into a separate task to continuously | ||
// refresh endpoints. | ||
if tx.needs(endpoint_req) { | ||
tx.send(client.call(endpoint_req).await) |
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: I might break this await out into its own line, I find it makes it easier to digest that there is async work within this block.
|
||
/// API Endpoint | ||
/// | ||
/// This implements an API endpoint as specified in https://awslabs.github.io/smithy/1.0/spec/core/endpoint-traits.html |
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.
I might use a markdown link instead of full link in plain text?
immutable: bool, | ||
} | ||
|
||
pub struct EndpointPrefix(String); |
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.
Does this get cloned often? Maybe make this Arc<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.
it gets used as a format!
argument normally so I don't think that gets us anything for now
Co-authored-by: Lucio Franco <[email protected]>
Issue #, if available: #109, #165
Description of changes: This commit adds
Endpoint
to smithy-http & records our design decisions inendpoint.md
. This provides support for the endpoint trait in Smithy. A design for endpoint discovery is proposed but is not currently implemented.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.