Skip to main content

NodeResolver

Trait NodeResolver 

Source
pub trait NodeResolver: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 JobTarget,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<NodeId>, ControllerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Resolves abstract JobTargets (AnyOne/AnyK/AllNodes) into concrete NodeIds. The substrate doesn’t have a live cluster directory baked in; consumers supply the resolver.

Required Methods§

Source

fn name(&self) -> &'static str

Backend identifier for telemetry.

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, target: &'life1 JobTarget, ) -> Pin<Box<dyn Future<Output = Result<Vec<NodeId>, ControllerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a target into a concrete set of NodeIds.

§Errors

Implementations may surface backend errors via ControllerError.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§