atomr-dashboard 0.3.1

Live web UI over a running atomr system — REST + WebSocket + embedded React SPA, Prometheus / OTLP exporters.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Cluster state + reachability.

use axum::extract::State;
use axum::Json;

use atomr_telemetry::dto::{ClusterStateInfo, ReachabilityRecord};

use crate::AppState;

pub async fn get_state(State(state): State<AppState>) -> Json<ClusterStateInfo> {
    Json(state.telemetry.cluster.snapshot())
}

pub async fn get_reachability(State(state): State<AppState>) -> Json<Vec<ReachabilityRecord>> {
    Json(state.telemetry.cluster.snapshot().reachability_records)
}