Comments (2)
The Smithy code-generator currently doesn't have an opinionated structure on how endpoints are set or determined for a client. So the base generated client does not generate or register middleware that sets the endpoint. We have a pair GoIntegration
plugin on the the SDK side that has an opinionated approach to endpoints (EndpointResolver
type that takes a name of a region and returns an SDK specific endpoint structure describing a resolved endpoint). We then have our generated code based on the service's endpoints description and create a resolver and middleware that queries the endpoint and sets the endpoint for the underlying transport.
See AwsEndpointGenerator and EndpointGenerator for more in depth detail on how we are doing the code generation. ResolveEndpoint is an example of the generated middleware for the service client.
For the SDK's use case we needed to have a per client endpoint resolver and middleware due to our push to move away from a giant endpoints structure, and instead ship endpoints alongside the clients themselves. Depending on your use case you likely don't need this level of complexity.
from smithy-go.
I would note that smithy-go now supports modeled endpoint resolution, though the feature isn't part of the public IDL docs. That aside I have #458 open to track making smithy-go usable on its own, as of this writing it heavily depends on additional codegen support added in the v2 SDK to produce a working client.
from smithy-go.
Related Issues (20)
- codegen/runtime: Retries
- codegen/runtime: SRA observability/telemetry
- codegen/runtime: Interceptors
- runtime: sigv4 signer
- runtime: sigv4a signer
- refactor: replace middleware with explicit operation phases
- codegen: remove "V2" suffix from endpoint resolution codegen
- codegen/runtime: @httpChecksum
- publish to maven
- runtime: refactor httpBearerAuth
- codegen: `RuntimeClientPlugin` not having access to a `SymbolProvider` HOT 1
- docs: revamp README and usage guide HOT 1
- Middleware, Transport (and maybe others) broken since aws-sdk-go-v2 release-2023-11-15 HOT 1
- codegen/runtime: operation checksums
- protocol: smithy.protocols#rpcv2Cbor HOT 1
- codegen/runtime: event streams
- Explore ways to reduce size of generated output HOT 3
- codegen: refactor waiters/paginators to be not integrations
- codegen: use DirectedCodegen in client codegen
- rename go-codegen plugin to go-client-codegen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smithy-go.