DistributedCoordinator

Struct DistributedCoordinator 

Source
pub struct DistributedCoordinator { /* private fields */ }
Expand description

分散コーディネーター

Implementations§

Source§

impl DistributedCoordinator

Source

pub fn new(load_balancer: Arc<dyn LoadBalancer>) -> Self

Source

pub async fn register_node(&self, node: NodeInfo)

ノードを登録

Source

pub async fn unregister_node(&self, node_id: &str)

ノードを削除

Source

pub async fn update_heartbeat(&self, node_id: &str)

ノードのハートビートを更新

Source

pub async fn submit_workflow( &self, execution_id: WorkflowExecutionId, ) -> Result<String, WorkflowError>

ワークフロー実行を分散実行キューに追加

Source

pub async fn assign_task( &self, task_id: &str, ) -> Result<Option<String>, WorkflowError>

利用可能なノードにタスクを割り当て

Source

pub async fn complete_task( &self, task_id: &str, success: bool, ) -> Result<(), WorkflowError>

タスク完了を報告

Source

pub async fn get_running_tasks(&self) -> Vec<DistributedTask>

実行中のタスクを取得

Source

pub async fn get_node_load(&self, node_id: &str) -> Option<f64>

ノードの負荷情報を取得

Source

pub async fn get_cluster_load(&self) -> f64

クラスター全体の負荷を取得

Source

pub async fn cleanup_dead_nodes(&self, timeout: Duration)

デッドノードの検出とクリーンアップ

Source

pub async fn failover_task( &self, _task_id: &str, ) -> Result<Option<String>, WorkflowError>

フェイルオーバー: 失敗したタスクを別のノードに再割り当て

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,