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

[servers] extract rpc modules to utils #322

Merged
merged 21 commits into from
May 18, 2021
Merged

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented May 17, 2021

Closing #307

One annoyance with this, is that it's possible to register subscription on HTTP server with this.
Maybe introduce some trait for circumvent this?!

This commit extracts the `rpc_module` from the servers to be shared.
It will help to re-use rpc modules within both the servers
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some more docs.

utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
/// Abstract JSON-RPC modules that can be used to register methods on a server.
pub mod rpc_module;

/// Sender.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of sending going on in this library… can you extend the docs a bit here please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed it to MethodSink and added some docs, should be more understandable now.

Can you take another look?

utils/src/server/mod.rs Outdated Show resolved Hide resolved
utils/src/server/mod.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
@dvdplm
Copy link
Contributor

dvdplm commented May 17, 2021

One annoyance with this, is that it's possible to register subscription on HTTP server with this.

Seems like a minor annoyance. Let's log a low-prio issue and move on.

niklasad1 and others added 14 commits May 17, 2021 21:34
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
utils/src/server/helpers.rs Outdated Show resolved Hide resolved
utils/src/server/helpers.rs Outdated Show resolved Hide resolved
utils/src/server/mod.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
utils/src/server/rpc_module.rs Outdated Show resolved Hide resolved
niklasad1 and others added 6 commits May 18, 2021 11:45
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
@niklasad1 niklasad1 merged commit 4f51e2f into master May 18, 2021
@niklasad1 niklasad1 deleted the na-extract-server-module branch May 18, 2021 10:30
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.

2 participants