hopr_transport_network::heartbeat

Trait HeartbeatExternalApi

Source
pub trait HeartbeatExternalApi {
    // Required method
    fn get_peers<'life0, 'async_trait>(
        &'life0 self,
        from_timestamp: SystemTime,
    ) -> Pin<Box<dyn Future<Output = Vec<PeerId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Get all peers considered by the Network to be pingable.

After a duration of non-pinging based specified by the configurable threshold.

Implementors§