Skip to content

Commit

Permalink
Use blobs and tags cli from iroh-blobs crate
Browse files Browse the repository at this point in the history
  • Loading branch information
rklaehn committed Nov 18, 2024
1 parent 38bfe5e commit 49f80e6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1,278 deletions.
6 changes: 5 additions & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ iroh-router = { path = "./iroh-router" }

iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip", branch = "main" }
iroh-docs = { git = "https://github.com/n0-computer/iroh-docs", branch = "main" }
iroh-blobs = { git = "https://github.com/n0-computer/iroh-blobs", branch = "main" }
iroh-blobs = { git = "https://github.com/n0-computer/iroh-blobs", branch = "cli" }
1 change: 1 addition & 0 deletions iroh-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ iroh = { version = "0.28.1", path = "../iroh", features = ["metrics"] }
iroh-gossip = "0.28.1"
iroh-docs = { version = "0.28.0", features = ["rpc"]}
iroh-metrics = { version = "0.28.0" }
iroh-blobs = { version = "0.28.1", features = ["cli"] }
parking_lot = "0.12.1"
pkarr = { version = "2.2.0", default-features = false }
portable-atomic = "1"
Expand Down
15 changes: 7 additions & 8 deletions iroh-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ use std::{
use anyhow::{ensure, Context, Result};
use clap::Parser;
use iroh::client::Iroh;
use iroh_blobs::cli::{BlobAddOptions, BlobSource};

use self::{
blobs::{BlobAddOptions, BlobSource},
rpc::RpcCommands,
start::RunType,
};
use self::{rpc::RpcCommands, start::RunType};
use crate::config::{ConsoleEnv, NodeConfig};

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

/// iroh is a tool for building distributed apps.
///
Expand Down Expand Up @@ -191,7 +187,10 @@ impl Cli {
|client| async move {
match add_command {
None => Ok(()),
Some(command) => command.run(&client).await,
Some(command) => {
let node_addr = client.net().node_addr().await?;
command.run(&client.blobs(), node_addr).await
}
}
},
)
Expand Down
Loading

0 comments on commit 49f80e6

Please sign in to comment.