Skip to main content

ClusterViewProvider

Trait ClusterViewProvider 

Source
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§

Source

fn submit_cluster_job( &self, request: SubmitClusterJob, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>

Submit a cluster-scoped job to the deterministic placement coordinator.

Source

fn list_cluster_jobs( &self, timeout: Duration, ) -> ClusterViewFuture<'_, ClusterJobList>

Aggregate job snapshots from local and peer nodes.

Source

fn cluster_node_info( &self, timeout: Duration, ) -> ClusterViewFuture<'_, ClusterNodeList>

Return the local cluster membership and DCP node-session view.

Source

fn cluster_job_status( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>

Return status for a cluster job, routed through the coordinator table.

Source

fn drain_cluster_job( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>

Drain a cluster job on its current placement node.

Source

fn stop_cluster_job( &self, name: String, timeout: Duration, ) -> ClusterViewFuture<'_, WireJobStatus>

Stop a cluster job on its current placement node.

Source

fn remember_cluster_assignment( &self, request: RememberClusterAssignment, ) -> ClusterViewFuture<'_, ()>

Remember an assignment replicated by the active coordinator.

Source

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§

Source

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".

Implementors§