Skip to content

Commit

Permalink
refactor(iroh-cli)!: Use gossip cli from iroh-gossip crate (#2945)
Browse files Browse the repository at this point in the history
## Description

Use the cli args and handlers from the iroh-gossip crate

...and remove them from here.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
  • Loading branch information
rklaehn authored Nov 18, 2024
1 parent ad91831 commit fcc105b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 134 deletions.
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions iroh-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ hex = "0.4.3"
human-time = "0.1.6"
indicatif = { version = "0.17", features = ["tokio"] }
iroh = { version = "0.28.1", path = "../iroh", features = ["metrics"] }
iroh-gossip = "0.28.1"
iroh-docs = { version = "0.28.0", features = ["rpc", "cli"]}
iroh-metrics = { version = "0.28.0" }
iroh-blobs = { version = "0.28.1", features = ["cli"] }
iroh-docs = { version = "0.28.0", features = ["cli"] }
iroh-gossip = { version = "0.28.1", features = ["cli"] }
iroh-metrics = { version = "0.28.0" }
parking_lot = "0.12.1"
pkarr = { version = "2.2.0", default-features = false }
portable-atomic = "1"
Expand Down
2 changes: 1 addition & 1 deletion iroh-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use crate::config::NodeConfig;

pub(crate) mod console;
pub(crate) mod doctor;
pub(crate) mod gossip;
pub(crate) mod net;
pub(crate) mod rpc;
pub(crate) mod start;
pub(crate) use iroh_blobs::{cli as blobs, cli::tags};
pub(crate) use iroh_docs::{cli as docs, cli::authors};
pub(crate) use iroh_gossip::cli as gossip;

/// iroh is a tool for building distributed apps.
///
Expand Down
128 changes: 0 additions & 128 deletions iroh-cli/src/commands/gossip.rs

This file was deleted.

2 changes: 1 addition & 1 deletion iroh-cli/src/commands/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl RpcCommands {
Self::Docs { command } => command.run(&iroh.docs(), &iroh.blobs(), env).await,
Self::Authors { command } => command.run(&iroh.authors(), env).await,
Self::Tags { command } => command.run(&iroh.tags()).await,
Self::Gossip { command } => command.run(iroh).await,
Self::Gossip { command } => command.run(&iroh.gossip()).await,
Self::Stats => {
let stats = iroh.stats().await?;
for (name, details) in stats.iter() {
Expand Down

0 comments on commit fcc105b

Please sign in to comment.