-
Notifications
You must be signed in to change notification settings - Fork 104
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
feat(jsonrpc): require Sync
on transport params
#474
feat(jsonrpc): require Sync
on transport params
#474
Conversation
Can you explain how adding more constraints is improving flexibility? Also please don't submit PR without any description unless it's something very obvious like typo fixing. Thanks. |
Sorry, Purpose Used to customize JsonRpcTransport for extend, you can see ethers-rs, Thanks |
I guess I wasn't clear enough. I was asking for a specific example of what use case this enables. Like what scenario is this change enabling? What wasn't possible before this change and made possible thanks to the proposed changes? |
Hi~, @xJonathanLEI I have added a transport for read and write separation(RwTransport), you can have a look at my sample, and later, according to more usage scenarios of our company, add more transport, such as RetryTransport, FailoverTransport and so on. Thanks. |
@xJonathanLEI |
Add constraints, you can implement more Transport, otherwise, the library user can not customize. usage scenario, such as read/write separation, fault tolerance and so on. |
57d62e8
to
292515c
Compare
@clint419 Thanks for the update. I've reviewed the use case and agree that having I've updated the PR to only include the changes on the trait though. The additional transport impls have been removed. It's possible to implement those outside of the library. |
Sync
on transport params
This is a breaking change, but we're about to release a new version with many other breaking changes anyways. So we're good. Also this mostly only breaks applications that implement custom transports, and it's trivial to patch. |
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.
LGTM
No description provided.