use std::sync::Arc;
use tokio::sync::RwLock;
use anyhow::{Context, Result};
use tracing::info;
use amqp_bridge::{Config, HealthState, LogFormat, init_logging, run_with_ctrl_c};
#[tokio::main]
async fn main() -> Result<()> {
let log_format = LogFormat::from_env();
init_logging(log_format);
info!(event = "cli_start", log_format = ?log_format, "CLI starting");
let config = Config::from_env().context("Failed to load configuration")?;
let health_state = Arc::new(RwLock::new(HealthState::default()));
run_with_ctrl_c(config, health_state, None).await
}