Mountain/IPC/Common/
mod.rs

1//! # IPC Common Abstractions
2//!
3//! This module provides shared types and abstractions used across the IPC
4//! layer. It eliminates code duplication and provides a consistent foundation
5//! for all IPC communication components.
6//!
7//! ## Architecture
8//!
9//! The Common module is organized into focused, atomic modules:
10//!
11//! - **MessageType**: Core message structures for IPC communication
12//! - **ConnectionStatus**: Connection health and state tracking
13//! - **HealthStatus**: Health monitoring and scoring
14//! - **PerformanceMetrics**: Performance measurement and tracking
15//! - **ServiceInfo**: Service discovery and information
16//!
17//! ## Design Principles
18//!
19//! 1. **Single Responsibility**: Each module has one clear purpose
20//! 2. **Reusability**: Types are shared across IPC components
21//! 3. **Type Safety**: Strong typing prevents common errors
22//! 4. **Serde Support**: All types support serialization for IPC
23//!
24//! ## Example Usage
25//!
26//! ```rust
27//! use crate::IPC::Common::{ConnectionStatus, HealthStatus, PerformanceMetrics};
28//!
29//! let status = ConnectionStatus::Connected;
30//! let health = HealthStatus::new(100);
31//! let metrics = PerformanceMetrics::default();
32//! ```
33
34pub mod ConnectionStatus;
35pub mod HealthStatus;
36pub mod MessageType;
37pub mod PerformanceMetrics;
38pub mod ServiceInfo;
39
40// Re-export commonly used types (use module prefix to avoid naming conflicts)
41pub use ConnectionStatus::{ConnectionState as ConnectionState};
42pub use HealthStatus::{HealthIssue, HealthMonitor, SeverityLevel};
43pub use MessageType::{IPCCommand, IPCMessage, IPCResponse};
44pub use PerformanceMetrics::{ThroughputMetrics};
45pub use ServiceInfo::{ServiceRegistry, ServiceState};
46
47// Re-exports for struct types (using module prefix)
48pub use ConnectionStatus::ConnectionStatus as Status;
49// Note: PerformanceMetrics and ServiceInfo are modules, not types - use directly