Trait iroh_node_util::rpc::server::AbstractNode

source ·
pub trait AbstractNode: Send + Sync + 'static {
    // Required methods
    fn endpoint(&self) -> &Endpoint;
    fn shutdown(&self);

    // Provided methods
    fn rpc_addr(&self) -> Option<SocketAddr> { ... }
    fn stats(&self) -> Result<BTreeMap<String, CounterStats>> { ... }
}
Expand description

Trait that provides fields used by the rpc handler for the net and node requests.

Required Methods§

source

fn endpoint(&self) -> &Endpoint

Get the endpoint of the node

source

fn shutdown(&self)

Shutdown the node, used by the node shutdown rpc call

Provided Methods§

source

fn rpc_addr(&self) -> Option<SocketAddr>

Rpc address of the node, used by the node status rpc call

source

fn stats(&self) -> Result<BTreeMap<String, CounterStats>>

Stats for the node stats rpc call

Implementors§