Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"mcp__acp__Edit",
"mcp__acp__Bash"
]
}
}
4 changes: 1 addition & 3 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iroh-services"
version = "0.12.0"
version = "0.11.0"
edition = "2024"
readme = "README.md"
description = "p2p quic connections dialed by public key"
Expand All @@ -21,7 +21,8 @@ iroh-metrics = { version = "0.38", default-features = false }
iroh-tickets = "0.4"
n0-error = "0.1"
n0-future = "0.3"
rcan = "0.3.0"
# rcan = "0.3.0"
rcan = { path = "../rcan" }
serde = { version = "1.0.217", features = ["derive"] }
strum = { version = "0.27.1", features = ["derive"] }
thiserror = "2.0.12"
Expand Down
8 changes: 8 additions & 0 deletions examples/net_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ use iroh_services::{

#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();

// 1. Create an endpoint that will both dial iroh-services and accept incoming
// requests from the iroh-services service via a ClientHost.
let endpoint = Endpoint::bind(presets::N0).await?;
Expand All @@ -26,9 +28,15 @@ async fn main() -> Result<()> {
// EndpointID. Normally we'd pass it straight to the client builder.
let secret = ApiSecret::from_env_var(API_SECRET_ENV_VAR_NAME)?;

// optional: label the endpoint. Here we generate a label from the endpoint,
// in your app this would be used to connect with something like a userId
let id = endpoint.id().to_string();
let label = format!("net-diagnostics-example-{}", &id[..8]);

// 3. Build a Client that dials iroh-services (as in all other examples).
let client = Client::builder(&endpoint)
.api_secret(secret.clone())?
.label(label)?
.build()
.await?;

Expand Down
Loading
Loading