geth/crates/geth-iroh/src/lib.rs

28 lines
865 B
Rust
Raw Normal View History

2026-05-15 15:08:20 +02:00
use serde::{Deserialize, Serialize};
pub const ALPN_CONTROL: &[u8] = b"/geth/control/1";
pub const ALPN_KV: &[u8] = b"/geth/kv/1";
pub const ALPN_CAS: &[u8] = b"/geth/cas/1";
pub const ALPN_PUBSUB: &[u8] = b"/geth/pubsub/1";
pub const ALPN_PIPE: &[u8] = b"/geth/pipe/1";
pub const ALPN_DB: &[u8] = b"/geth/db/1";
pub const ALPN_DOCUMENT: &[u8] = b"/geth/document/1";
pub const ALPN_SSH_PROXY: &[u8] = b"/geth/ssh-proxy/1";
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct EndpointStatus {
pub enabled: bool,
pub endpoint_id: Option<String>,
pub note: String,
}
impl EndpointStatus {
#[must_use]
pub fn scaffolded() -> Self {
Self {
enabled: false,
endpoint_id: None,
note: "Iroh endpoint integration is scaffolded for a later pinned API pass".to_owned(),
}
}
}