Comments (5)
perhaps the contructor should just accept a transport instance instead of configurations? either/or?
from generator.
Yeah I think you're leaning the right way on that . I think RequestManager should stay encapsulated because we don't want to leak those internals, and we should have a request option.
Maybe something like
createTransport(...)=>Transport
/* Takes all the transport config data that gets handle in the constructor and instead is handled by createTransport. This is exported but not the underlying transports, so outside of the generic interface,
there shouldn't be transport construction going on outside of the method.
So we can keep tweaking the internal representation
*/
const transport = [createTransport({host,port,type,path},options)]
new Client(transports,{nextId: ()=> string | int})
Curious on what you think or is this what you're think as well ?
from generator.
yep, I think thats the idea. As an addition to that, we would probably be able to add configurability from the generator config file (in here: https://github.com/open-rpc/generator/blob/master/test-generator-config.json#L6). This would allow users to produce a generated result that has some preset headers (so that the end-user doesn't need to muck around with passing in the same options every time)
from generator.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from generator.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from generator.
Related Issues (20)
- error on npm install HOT 1
- Broken typescript generated, when using dots in method names HOT 6
- Error building generated gatsby docs HOT 1
- Update generated JS client to latest npm packages & node LTS HOT 1
- Update dependencies and node version on docs generator HOT 1
- Error when using generator wtih: open-rpc-generator generate HOT 1
- Add explicit outputDir options per component HOT 2
- Running open-rpc-generator generate -c overwrites package.json HOT 1
- params by-name keys are incorrectly mapped HOT 1
- Additional Properties Typing specificity HOT 1
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 6
- New Language Support: Markdown
- Option to only include api playground in generated docs
- Add java client generator
- Add python client (modern using typing)
- Allow injection or configuration of transport client HOT 1
- Lean Clients
- "RangeError: Maximum call stack size exceeded" when adding rpc.discover method HOT 1
- Think about adding a github discussion board
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 generator.