pub trait ClusterSpec:
Clone
+ Send
+ Sync
+ 'static {
type Command: Debug + Send + TryIntoProtocolNonce;
type Response: Debug + Send;
const NAME: &str;
// Required method
fn run_worker(
&self,
timely_worker: &mut TimelyWorker,
client_rx: UnboundedReceiver<(Uuid, UnboundedReceiver<Self::Command>, UnboundedSender<Self::Response>)>,
);
// Provided method
fn build_cluster<'life0, 'async_trait>(
&'life0 self,
config: TimelyConfig,
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 Constants§
Required Associated Types§
Sourcetype Command: Debug + Send + TryIntoProtocolNonce
type Command: Debug + Send + TryIntoProtocolNonce
The cluster command type.
Required Methods§
Sourcefn run_worker(
&self,
timely_worker: &mut TimelyWorker,
client_rx: UnboundedReceiver<(Uuid, UnboundedReceiver<Self::Command>, UnboundedSender<Self::Response>)>,
)
fn run_worker( &self, timely_worker: &mut TimelyWorker, client_rx: UnboundedReceiver<(Uuid, UnboundedReceiver<Self::Command>, UnboundedSender<Self::Response>)>, )
Run the given Timely worker.
Provided Methods§
Sourcefn build_cluster<'life0, 'async_trait>(
&'life0 self,
config: TimelyConfig,
tokio_executor: Handle,
) -> Pin<Box<dyn Future<Output = Result<TimelyContainer<Self>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build_cluster<'life0, 'async_trait>(
&'life0 self,
config: TimelyConfig,
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".