Function cluster_status

Source
pub async fn cluster_status(
    state: &State<Arc<RwLock<SharedState>>>,
    cluster: &State<Arc<RwLock<ClusterManager>>>,
) -> Json<ApiResponse>
Expand description

Provides detailed cluster status information including node roles and membership.

This endpoint returns comprehensive information about the current state of the OmniOrchestrator cluster, including which node is the leader, cluster membership, and the role of the current node. This information is crucial for cluster monitoring and debugging distributed system issues.

§Arguments

  • state - Shared state containing node role and cluster information
  • cluster - Cluster manager with information about all known nodes

§Returns

A JSON response containing:

  • Overall cluster status
  • Current node’s role (leader/follower)
  • List of all known cluster nodes