| Crates.io | iron_reliability |
| lib.rs | iron_reliability |
| version | 0.3.0 |
| created_at | 2025-11-25 13:53:59.627534+00 |
| updated_at | 2025-12-16 18:04:36.731796+00 |
| description | Resilience patterns for distributed systems |
| homepage | |
| repository | https://github.com/.../iron_runtime |
| max_upload_size | |
| id | 1949798 |
| size | 29,050 |
Circuit breakers and fault tolerance for multi-agent systems.
[dependencies]
iron_cage_reliability = { version = "0.1", features = ["full"] }
enabled (default): Full circuit breaker functionality
full: All functionality (currently same as enabled)
use iron_cage_reliability::CircuitBreaker;
// Create circuit breaker with 5-failure threshold
let cb = CircuitBreaker::new(5, 60);
// Perform operation with circuit breaker protection
match cb.call("external_api", || {
call_external_service()
}) {
Ok(result) => println!("Success: {:?}", result),
Err(e) if cb.is_open("external_api") => {
println!("Circuit breaker open, using fallback");
},
Err(e) => println!("Call failed: {}", e),
}
Responsibilities: Implements circuit breaker pattern (Closed/Open/HalfOpen states) for agent reliability with automatic failure detection and recovery. Prevents cascading failures by temporarily disabling failing agents while allowing periodic retry attempts. Requires Rust 1.75+, all platforms supported, uses exponential backoff for recovery.
In Scope:
Out of Scope:
| File | Responsibility |
|---|---|
| lib.rs | Circuit breaker pattern for preventing cascading failures. |
Notes:
MIT