Trait IDashboardApi

Source
pub trait IDashboardApi {
    // Required methods
    fn auth<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiAuth> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn guardian_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = PeerId> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn guardian_names<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn federation_name<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn session_count<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn consensus_ord_latency<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<Duration>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn p2p_connection_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, Option<Duration>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn federation_invite_code<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn federation_audit<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = AuditSummary> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_module_by_kind(&self, kind: ModuleKind) -> Option<&DynServerModule>;

    // Provided method
    fn into_dyn(self) -> DynDashboardApi
       where Self: Sized + Send + Sync + 'static { ... }
}
Expand description

Interface for guardian dashboard API in a running federation

Required Methods§

Source

fn auth<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ApiAuth> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the guardian’s authentication details

Source

fn guardian_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PeerId> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the guardian ID

Source

fn guardian_names<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a map of peer IDs to guardian names

Source

fn federation_name<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the federation name

Source

fn session_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the current active session count

Source

fn consensus_ord_latency<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Duration>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The time it took to order our last proposal in the current session

Source

fn p2p_connection_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, Option<Duration>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a map of peer ID to estimated round trip time

Source

fn federation_invite_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the federation invite code to share with users

Source

fn federation_audit<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AuditSummary> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the federation audit summary

Source

fn get_module_by_kind(&self, kind: ModuleKind) -> Option<&DynServerModule>

Get reference to a server module instance by module kind

Provided Methods§

Source

fn into_dyn(self) -> DynDashboardApi
where Self: Sized + Send + Sync + 'static,

Create a trait object

Implementors§