Clean up Chinese comments and add comprehensive English README
- Replace all Chinese comments with English equivalents in: - src/health_monitor.rs - src/lib.rs - tests/integration_test.rs - Add comprehensive README.md with: - Project overview and features - Architecture diagram - Installation and configuration guide - Data format specifications - Health monitoring documentation - Troubleshooting guide
This commit is contained in:
@@ -115,7 +115,7 @@ impl HealthMonitor {
|
||||
.get_or_init(|| async {
|
||||
let monitor = HealthMonitor::new();
|
||||
|
||||
// 启动健康状态报告任务
|
||||
// Start health status reporting task
|
||||
let monitor_clone = monitor.clone();
|
||||
tokio::spawn(async move {
|
||||
monitor_clone.start_health_reporting().await;
|
||||
@@ -192,7 +192,7 @@ impl HealthMonitor {
|
||||
self.log_service_health("WebSocket", &websocket_health);
|
||||
self.log_service_health("WAN Polling", &wan_health);
|
||||
|
||||
// 如果有服务不健康,发出警告
|
||||
// Warn if any service is unhealthy
|
||||
if !websocket_health.is_healthy {
|
||||
warn!("WebSocket service is unhealthy! Consecutive failures: {}", websocket_health.consecutive_failures);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ impl HealthMonitor {
|
||||
warn!("WAN Polling service is unhealthy! Consecutive failures: {}", wan_health.consecutive_failures);
|
||||
}
|
||||
|
||||
// 如果连续失败次数过多,发出错误警报
|
||||
// Alert if consecutive failures are too many
|
||||
if websocket_health.consecutive_failures > 10 {
|
||||
error!("WebSocket service has {} consecutive failures!", websocket_health.consecutive_failures);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
pub mod retry;
|
||||
pub mod health_monitor;
|
||||
|
||||
// 重新导出常用的类型和函数
|
||||
// Re-export commonly used types and functions
|
||||
pub use retry::{RetryConfig, Retrier, retry_with_config, retry, retry_forever};
|
||||
pub use health_monitor::{HealthMonitor, ServiceType, ConnectionHealth};
|
||||
|
Reference in New Issue
Block a user