pub trait ClusterViewProvider:
Send
+ Sync
+ 'static {
// Required methods
fn submit_cluster_job(
&self,
request: SubmitClusterJob,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>;
fn list_cluster_jobs(
&self,
timeout: Duration,
) -> ClusterViewFuture<'_, ClusterJobList>;
fn cluster_node_info(
&self,
timeout: Duration,
) -> ClusterViewFuture<'_, ClusterNodeList>;
fn cluster_job_status(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>;
fn drain_cluster_job(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>;
fn stop_cluster_job(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>;
fn remember_cluster_assignment(
&self,
request: RememberClusterAssignment,
) -> ClusterViewFuture<'_, ()>;
fn register_restarted_cluster_assignment(
&self,
instance_name: String,
assignment: ClusterJobStart,
timeout: Duration,
) -> ClusterViewFuture<'_, ()>;
// Provided method
fn subscribe_cluster_metrics(
&self,
_interval: Duration,
) -> Option<Receiver<MetricSample>> { ... }
}Expand description
Provider installed by cluster-aware agents to serve read-only cluster DCP requests.
Required Methods§
Sourcefn submit_cluster_job(
&self,
request: SubmitClusterJob,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>
fn submit_cluster_job( &self, request: SubmitClusterJob, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>
Submit a cluster-scoped job to the deterministic placement coordinator.
Sourcefn list_cluster_jobs(
&self,
timeout: Duration,
) -> ClusterViewFuture<'_, ClusterJobList>
fn list_cluster_jobs( &self, timeout: Duration, ) -> ClusterViewFuture<'_, ClusterJobList>
Aggregate job snapshots from local and peer nodes.
Sourcefn cluster_node_info(
&self,
timeout: Duration,
) -> ClusterViewFuture<'_, ClusterNodeList>
fn cluster_node_info( &self, timeout: Duration, ) -> ClusterViewFuture<'_, ClusterNodeList>
Return the local cluster membership and DCP node-session view.
Sourcefn cluster_job_status(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>
fn cluster_job_status( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>
Return status for a cluster job, routed through the coordinator table.
Sourcefn drain_cluster_job(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>
fn drain_cluster_job( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>
Drain a cluster job on its current placement node.
Sourcefn stop_cluster_job(
&self,
name: String,
timeout: Duration,
) -> ClusterViewFuture<'_, WireJobStatus>
fn stop_cluster_job( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>
Stop a cluster job on its current placement node.
Sourcefn remember_cluster_assignment(
&self,
request: RememberClusterAssignment,
) -> ClusterViewFuture<'_, ()>
fn remember_cluster_assignment( &self, request: RememberClusterAssignment, ) -> ClusterViewFuture<'_, ()>
Remember an assignment replicated by the active coordinator.
Sourcefn register_restarted_cluster_assignment(
&self,
instance_name: String,
assignment: ClusterJobStart,
timeout: Duration,
) -> ClusterViewFuture<'_, ()>
fn register_restarted_cluster_assignment( &self, instance_name: String, assignment: ClusterJobStart, timeout: Duration, ) -> ClusterViewFuture<'_, ()>
Re-register intent when an owning node locally restarts a cluster job.
Provided Methods§
Sourcefn subscribe_cluster_metrics(
&self,
_interval: Duration,
) -> Option<Receiver<MetricSample>>
fn subscribe_cluster_metrics( &self, _interval: Duration, ) -> Option<Receiver<MetricSample>>
Proxy metrics from remote cluster-job placement nodes over the existing
authenticated peer sessions. Implementations return None when remote
metrics routing is unavailable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".