Trait forge::NodeExt

source ·
pub trait NodeExt: Node {
    // Provided methods
    fn async_json_rpc_client(&self) -> JsonRpcClient { ... }
    fn json_rpc_client(&self) -> BlockingClient { ... }
    fn debug_client(&self) -> NodeDebugClient { ... }
    fn restart(&mut self) -> Result<()> { ... }
    fn get_metric(&self, metric_name: &str) -> Result<Option<i64>> { ... }
    fn get_metric_with_fields(
        &self,
        metric_name: &str,
        fields: HashMap<String, String>
    ) -> Result<Option<i64>> { ... }
    fn get_connected_peers(
        &self,
        network_id: NetworkId,
        direction: Option<&str>
    ) -> Result<Option<i64>> { ... }
    fn liveness_check(&self, seconds: u64) -> Result<()> { ... }
    fn wait_until_healthy(&mut self, deadline: Instant) -> Result<()> { ... }
}

Provided Methods§

source

fn async_json_rpc_client(&self) -> JsonRpcClient

Return JSON-RPC client of this Node

source

fn json_rpc_client(&self) -> BlockingClient

Return JSON-RPC client of this Node

source

fn debug_client(&self) -> NodeDebugClient

Return a NodeDebugClient for this Node

source

fn restart(&mut self) -> Result<()>

Restarts this Node by calling Node::Stop followed by Node::Start

source

fn get_metric(&self, metric_name: &str) -> Result<Option<i64>>

Query a Metric for from this Node

source

fn get_metric_with_fields( &self, metric_name: &str, fields: HashMap<String, String> ) -> Result<Option<i64>>

source

fn get_connected_peers( &self, network_id: NetworkId, direction: Option<&str> ) -> Result<Option<i64>>

source

fn liveness_check(&self, seconds: u64) -> Result<()>

source

fn wait_until_healthy(&mut self, deadline: Instant) -> Result<()>

Implementors§

source§

impl<T> NodeExt for Twhere T: Node + ?Sized,