//! Diagnostics Service
//!
//! Topic-based diagnostics and performance monitoring for Mecha10.
//!
//! # Architecture
//!
//! All diagnostics are published to topic hierarchy under `/diagnostics`:
//! - `/diagnostics/streaming/*` - Camera streaming pipeline metrics
//! - `/diagnostics/webrtc/*` - WebRTC connection and quality metrics
//! - `/diagnostics/websocket/*` - WebSocket connection metrics
//! - `/diagnostics/redis/*` - Redis connection pool and operation metrics
//! - `/diagnostics/docker/*` - Docker container resource metrics
//! - `/diagnostics/system/*` - System-level resource metrics
//! - `/diagnostics/node/{id}/health` - Per-node health metrics
//!
//! # Usage
//!
//! ## Publishing Diagnostics
//!
//! ```rust,no_run
//! use mecha10_diagnostics::prelude::*;
//! use mecha10_core::prelude::*;
//!
//! async fn publish_metrics(ctx: &Context) -> Result<()> {
//!     // Publish streaming metrics
//!     let metrics = StreamingPipelineMetrics {
//!         timestamp: now_micros(),
//!         frames_received: 1234,
//!         frames_encoded: 1230,
//!         frames_sent: 1228,
//!         frames_dropped: 4,
//!         bytes_per_second: 400_000,
//!     };
//!
//!     ctx.publish_to(
//!         Topic::<DiagnosticMessage<StreamingPipelineMetrics>>::new(TOPIC_DIAGNOSTICS_STREAMING_PIPELINE),
//!         &DiagnosticMessage::new("simulation-bridge", metrics)
//!     ).await?;
//!
//!     Ok(())
//! }
//! ```
//!
//! ## Subscribing to Diagnostics
//!
//! ```rust,no_run
//! use mecha10_diagnostics::prelude::*;
//! use mecha10_core::prelude::*;
//!
//! async fn monitor_streaming(ctx: &Context) -> Result<()> {
//!     let mut rx = ctx.subscribe(
//!         Topic::<DiagnosticMessage<StreamingPipelineMetrics>>::new(TOPIC_DIAGNOSTICS_STREAMING_PIPELINE)
//!     ).await?;
//!
//!     while let Some(msg) = rx.recv().await {
//!         println!("FPS: {}", msg.payload.frames_received);
//!     }
//!
//!     Ok(())
//! }
//! ```

pub mod collectors;
pub mod metrics;
pub mod topics;
pub mod types;

pub mod prelude {
    //! Convenient re-exports for common diagnostics types

    pub use crate::collectors::*;
    pub use crate::metrics::*;
    pub use crate::topics::*;
    pub use crate::types::*;
}
