Skip to main content

ironflow_cli/commands/
stats.rs

1//! Stats command.
2
3use anyhow::Result;
4use ironflow_sdk::IronflowClient;
5
6use crate::output;
7
8/// Execute the `stats` command.
9///
10/// # Errors
11///
12/// Returns an error on API failure.
13pub async fn execute(client: &IronflowClient, json_mode: bool) -> Result<()> {
14    let response = client.get_stats().await?;
15    output::print_output(json_mode, &response, || output::stats_table(&response.data))?;
16    Ok(())
17}