pub trait PeerResolver: Send + Sync {
// 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;
}
Expand description
PeerResolver
provides methods to look up peer information by node ID.
This trait allows resolving both datanode and flownode peers, regardless of their current activity status. Returned peers may be inactive (i.e., not currently alive in the cluster).
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,
Looks up a datanode peer by its ID.
Returns Some(Peer)
if the datanode exists, or None
if not found.
The returned peer may be inactive.
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,
Looks up a flownode peer by its ID.
Returns Some(Peer)
if the flownode exists, or None
if not found.
The returned peer may be inactive.