-
Notifications
You must be signed in to change notification settings - Fork 163
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
refactor(iroh)!: Extract net and node rpc #2927
Conversation
# Conflicts: # Cargo.lock # Cargo.toml # iroh-cli/Cargo.toml # iroh/Cargo.toml # iroh/src/client.rs # iroh/src/client/docs.rs # iroh/src/node/rpc.rs # iroh/src/rpc_protocol.rs
# Conflicts: # Cargo.lock # iroh/src/node/rpc.rs
and move the node and net proto, client and server there
# Conflicts: # Cargo.lock
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2927/docs/iroh/ Last updated: 2024-11-20T10:37:17Z |
pub mod net; | ||
pub mod node; | ||
|
||
fn flatten<T, E1, E2>( |
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.
maybe add this to quic-rpc? its used everywhere 🤣
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.
Where is this used? In the context of streaming responses, right? I can maybe add it somewhere in client as an util...
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.
Not super urgent, but I am adding it to quic-rpc: n0-computer/quic-rpc#120
I like the structure, but I am not clear that we really need this in its own repo, or if we just leave it for the moment in |
and in some places where it does not.
please document the breaking changes, otherwise I left some last comments and then this should be good to go |
Description
Introduce a new crate iroh-node-util.
This contains generic utilities that are needed to build an iroh node, as well as the rpc protocol and rpc client to remote control an arbitrary iroh-net endpoint (add/remove addresses etc.) as well as to control the node as a whole (shutdown/stats/status).
Breaking Changes
Notes & open questions
Note: I think the rpc protocol and the client needs some refactoring. It isn't always clear to me what is node and what is net. But I think it might be best to do this in a subsequent PR and keep this one as a pure move things around PR for better separation.
Change checklist