pub trait PeerDiscovery: Send + Sync {
// Required methods
fn active_frontends<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn active_datanodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn active_flownodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
PeerDiscovery is a service for discovering active peers in the cluster.
Required Methods§
Sourcefn active_frontends<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, 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<NodeInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all currently active frontend nodes.
A frontend is considered active if it has reported a heartbeat within the most recent heartbeat interval, as determined by the in-memory backend.
Sourcefn active_datanodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn active_datanodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all currently active datanodes, optionally filtered by a predicate on their workloads.
A datanode is considered active if it has reported a heartbeat within the most recent heartbeat interval,
as determined by the in-memory backend.
The optional filter allows further selection based on the node’s workloads.
Sourcefn active_flownodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn active_flownodes<'life0, 'async_trait>(
&'life0 self,
filter: Option<for<'a> fn(&'a NodeWorkloads) -> bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all currently active flownodes, optionally filtered by a predicate on their workloads.
A flownode is considered active if it has reported a heartbeat within the most recent heartbeat interval,
as determined by the in-memory backend.
The optional filter allows further selection based on the node’s workloads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".