-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: Upgrade WebSocketClient to support full client functionality (#646)
* Expand WebSocket functionality This commit is multi-faceted. It: 1. Drastically simplifies much of the subscription-related functionality. 2. Expands the WebSocketClient's capabilities to be able to handle other types of requests other than just subscriptions (i.e. it implements the Client trait). Signed-off-by: Thane Thomson <[email protected]> * The http-client feature also needs the tracing lib Signed-off-by: Thane Thomson <[email protected]> * Make client mutable in example Signed-off-by: Thane Thomson <[email protected]> * Update CHANGELOG Signed-off-by: Thane Thomson <[email protected]> * Update ADR-008 to reflect recent changes Signed-off-by: Thane Thomson <[email protected]> * Fix minor bug in response handling Signed-off-by: Thane Thomson <[email protected]> * Update tests to use new WebSocketClient functionality Signed-off-by: Thane Thomson <[email protected]> * Fix/ignore clippy warnings Signed-off-by: Thane Thomson <[email protected]> * Fix documentation for rpc crate Signed-off-by: Thane Thomson <[email protected]> * Fix broken link in crate docs Signed-off-by: Thane Thomson <[email protected]> * Update RPC repo docs Signed-off-by: Thane Thomson <[email protected]> * Refactor to remove ChannelTx mutability ChannelTx::send now no longer needs to be mutable because the underlying channel has no mutability requirement. This leads to viral changes throughout the interfaces and clients (positive ones). ChannelTx::send also doesn't need to be async, because it relies on an unbounded channel. This also has some viral implications for other methods throughout the RPC client. If, in future, we want to support bounded channels, then we can consider making it async again. But we probably shouldn't make it async if we don't need it to be. Signed-off-by: Thane Thomson <[email protected]> * Client no longer needs to be mutable Signed-off-by: Thane Thomson <[email protected]> * Use explicit borrow_mut to avoid having to obtain subscriptions map twice Signed-off-by: Thane Thomson <[email protected]> * Rename method for clarity Signed-off-by: Thane Thomson <[email protected]>
- Loading branch information
1 parent
b618169
commit 5105efe
Showing
38 changed files
with
938 additions
and
1,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.