pub trait PeerDiscoveryBase {
// Required methods
fn start<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait;
fn stop<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait;
fn run<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait;
fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn notify(&self);
fn session(&self) -> OutboundSessionPtr;
fn p2p(&self) -> P2pPtr;
}
Expand description
Defines a common interface for multiple peer discovery processes.
NOTE: Currently only one Peer Discovery implementation exists. Making Peer Discovery generic enables us to support network swarming, since the peer discovery process will differ depending on whether it occurs on the overlay network or a subnet.