pub trait PeerLookupService {
// Required methods
fn datanode<'life0, 'async_trait>(
&'life0 self,
id: DatanodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flownode<'life0, 'async_trait>(
&'life0 self,
id: FlownodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn active_frontends<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
PeerLookupService is a service that can lookup peers.
Required Methods§
Sourcefn datanode<'life0, 'async_trait>(
&'life0 self,
id: DatanodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn datanode<'life0, 'async_trait>(
&'life0 self,
id: DatanodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the datanode with the given id. It may return inactive peers.
Sourcefn flownode<'life0, 'async_trait>(
&'life0 self,
id: FlownodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flownode<'life0, 'async_trait>(
&'life0 self,
id: FlownodeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the flownode with the given id. It may return inactive peers.
Sourcefn active_frontends<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn active_frontends<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all currently active frontend nodes that have reported a heartbeat within the most recent heartbeat interval from the in-memory backend.