ignition_core/actions/redundancy.rs
1//! `ign redundancy status` action (09-04, EXT-02) — a thin wrapper
2//! over the redundancy read. The wrapper indirection keeps the render
3//! arms symmetrical with the license merge (`{status: …}` envelope
4//! shape for the single-read families).
5
6use serde::Serialize;
7
8use crate::client::GatewayApi;
9use crate::client::redundancy::RedundancyStatusWire;
10use crate::error::CoreError;
11
12/// `ign redundancy status` output model.
13#[derive(Debug, Serialize)]
14pub struct RedundancyStatusResult {
15 /// The flat wire status, capture-shaped (units documented at the
16 /// model: uptime ms-since-start; lastSyncTimestamp -1 sentinel).
17 pub status: RedundancyStatusWire,
18}
19
20/// Read the redundancy status in one command.
21pub async fn redundancy_status(api: &dyn GatewayApi) -> Result<RedundancyStatusResult, CoreError> {
22 Ok(RedundancyStatusResult {
23 status: api.redundancy_status().await?,
24 })
25}