ai_lib/circuit_breaker/mod.rs
1//! 熔断器模块,提供AI API调用的弹性保护机制
2//!
3//! Circuit breaker module providing resilient protection for AI API calls.
4//!
5//! This module implements circuit breaker patterns to prevent cascading failures
6//! and improve system resilience when calling AI providers.
7//!
8//! The circuit breaker monitors failure rates and temporarily stops making requests
9//! to failing providers, allowing them time to recover.
10
11pub mod breaker;
12pub mod config;
13pub mod state;
14
15pub use breaker::CircuitBreaker;
16pub use config::CircuitBreakerConfig;
17pub use state::CircuitState;