pub trait Node: Send + Sync {
    fn peer_id(&self) -> PeerId;
    fn name(&self) -> &str;
    fn version(&self) -> Version;
    fn rest_api_endpoint(&self) -> Url;
    fn inspection_service_endpoint(&self) -> Url;
    fn config(&self) -> &NodeConfig;
    fn start<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn stop(&mut self) -> Result<()>; fn clear_storage(&mut self) -> Result<()>; fn health_check<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), HealthCheckError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn counter(&self, counter: &str, port: u64) -> Result<f64>; fn expose_metric(&self) -> Result<u64>; }
Expand description

Trait used to represent a running Validator or FullNode

Required Methods

Return the PeerId of this Node

Return the human readable name of this Node

Return the version this node is running

Return the URL for the REST API endpoint of this Node

Return the URL for the debug-interface for this Node

Return a reference to the Config this Node is using

Start this Node. This should be a noop if the Node is already running.

Stop this Node. This should be a noop if the Node isn’t running.

Clears this Node’s Storage

Performs a Health Check on the Node

Implementors