mz_cluster::client

Trait ClusterSpec

Source
pub trait ClusterSpec:
    Clone
    + Send
    + Sync
    + 'static {
    type Command: Debug + Send + TryIntoTimelyConfig;
    type Response: Debug + Send;

    // Required method
    fn run_worker<A: Allocate + 'static>(
        &self,
        timely_worker: &mut TimelyWorker<A>,
        client_rx: Receiver<(Receiver<Self::Command>, UnboundedSender<Self::Response>)>,
    );

    // Provided method
    fn build_cluster<'life0, 'async_trait>(
        &'life0 self,
        config: TimelyConfig,
        epoch: ClusterStartupEpoch,
        tokio_executor: Handle,
    ) -> Pin<Box<dyn Future<Output = Result<TimelyContainer<Self>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Specification for a Timely cluster to which a ClusterClient connects.

This trait is used to make the ClusterClient generic over the compute and storage cluster implementations.

Required Associated Types§

Source

type Command: Debug + Send + TryIntoTimelyConfig

The cluster command type.

Source

type Response: Debug + Send

The cluster response type.

Required Methods§

Source

fn run_worker<A: Allocate + 'static>( &self, timely_worker: &mut TimelyWorker<A>, client_rx: Receiver<(Receiver<Self::Command>, UnboundedSender<Self::Response>)>, )

Run the given Timely worker.

Provided Methods§

Source

fn build_cluster<'life0, 'async_trait>( &'life0 self, config: TimelyConfig, epoch: ClusterStartupEpoch, tokio_executor: Handle, ) -> Pin<Box<dyn Future<Output = Result<TimelyContainer<Self>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Build a Timely cluster using the given config.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§