Skip to content
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

Merged
merged 4 commits into from
Feb 8, 2021
Merged

Implement core Smithy endpoint support #183

merged 4 commits into from
Feb 8, 2021

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Jan 29, 2021

Issue #, if available: #109, #165

Description of changes: 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.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.
@rcoh rcoh requested a review from a team January 29, 2021 22:49
@rcoh rcoh linked an issue Jan 29, 2021 that may be closed by this pull request
design/src/endpoint.md Outdated Show resolved Hide resolved
// 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)
Copy link
Contributor

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.

rust-runtime/smithy-http/src/endpoint.rs Outdated Show resolved Hide resolved

/// API Endpoint
///
/// This implements an API endpoint as specified in https://awslabs.github.io/smithy/1.0/spec/core/endpoint-traits.html
Copy link
Contributor

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);
Copy link
Contributor

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>?

Copy link
Collaborator Author

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

rust-runtime/smithy-http/src/endpoint.rs Outdated Show resolved Hide resolved
@rcoh rcoh merged commit 6da9969 into main Feb 8, 2021
@rcoh rcoh deleted the endpoint branch February 8, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Endpoint Provider trait & Design
2 participants