Skip to main content

SelectorFactory

Trait SelectorFactory 

Source
pub trait SelectorFactory: Send + Sync {
    // Required method
    fn build(&self, ctx: SelectorFactoryContext) -> SelectorRef;

    // Provided method
    fn build_affinity_resolver(
        &self,
        _node_info_accessor: Arc<dyn NodeInfoAccessor>,
        _peer_discovery: PeerDiscoveryRef,
    ) -> Option<AffinityResolverRef> { ... }
}
Expand description

Builds the final datanode selector metasrv should use.

Required Methods§

Provided Methods§

Source

fn build_affinity_resolver( &self, _node_info_accessor: Arc<dyn NodeInfoAccessor>, _peer_discovery: PeerDiscoveryRef, ) -> Option<AffinityResolverRef>

Builds the resolver shared by allocation and failover callers.

The accessor includes last-known records of inactive source nodes; discovery is the shared scheduling-aware view of active nodes.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§