pub struct DistributedCoordinator { /* private fields */ }
Expand description
分散コーディネーター
Implementations§
Source§impl DistributedCoordinator
impl DistributedCoordinator
pub fn new(load_balancer: Arc<dyn LoadBalancer>) -> Self
Sourcepub async fn register_node(&self, node: NodeInfo)
pub async fn register_node(&self, node: NodeInfo)
ノードを登録
Sourcepub async fn unregister_node(&self, node_id: &str)
pub async fn unregister_node(&self, node_id: &str)
ノードを削除
Sourcepub async fn update_heartbeat(&self, node_id: &str)
pub async fn update_heartbeat(&self, node_id: &str)
ノードのハートビートを更新
Sourcepub async fn submit_workflow(
&self,
execution_id: WorkflowExecutionId,
) -> Result<String, WorkflowError>
pub async fn submit_workflow( &self, execution_id: WorkflowExecutionId, ) -> Result<String, WorkflowError>
ワークフロー実行を分散実行キューに追加
Sourcepub async fn assign_task(
&self,
task_id: &str,
) -> Result<Option<String>, WorkflowError>
pub async fn assign_task( &self, task_id: &str, ) -> Result<Option<String>, WorkflowError>
利用可能なノードにタスクを割り当て
Sourcepub async fn complete_task(
&self,
task_id: &str,
success: bool,
) -> Result<(), WorkflowError>
pub async fn complete_task( &self, task_id: &str, success: bool, ) -> Result<(), WorkflowError>
タスク完了を報告
Sourcepub async fn get_running_tasks(&self) -> Vec<DistributedTask>
pub async fn get_running_tasks(&self) -> Vec<DistributedTask>
実行中のタスクを取得
Sourcepub async fn get_node_load(&self, node_id: &str) -> Option<f64>
pub async fn get_node_load(&self, node_id: &str) -> Option<f64>
ノードの負荷情報を取得
Sourcepub async fn get_cluster_load(&self) -> f64
pub async fn get_cluster_load(&self) -> f64
クラスター全体の負荷を取得
Sourcepub async fn cleanup_dead_nodes(&self, timeout: Duration)
pub async fn cleanup_dead_nodes(&self, timeout: Duration)
デッドノードの検出とクリーンアップ
Sourcepub async fn failover_task(
&self,
_task_id: &str,
) -> Result<Option<String>, WorkflowError>
pub async fn failover_task( &self, _task_id: &str, ) -> Result<Option<String>, WorkflowError>
フェイルオーバー: 失敗したタスクを別のノードに再割り当て
Auto Trait Implementations§
impl !Freeze for DistributedCoordinator
impl !RefUnwindSafe for DistributedCoordinator
impl Send for DistributedCoordinator
impl Sync for DistributedCoordinator
impl Unpin for DistributedCoordinator
impl !UnwindSafe for DistributedCoordinator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more