resilient-rs 0.4.9

A Rust utility library for fault tolerance, including retry strategies, backoff mechanisms, and failure handling.
Documentation

A Rust utility library for fault tolerance, including retry strategies, backoff mechanisms, failure handling and much more. Crates.io Downloads Docs.rs 💖 Loved the work? Subscribe to my YouTube channel or consider giving this repository a ⭐ to show your support!

🚀 Feature Overview

Here’s a snapshot of what this library brings to the table—resilience, reliability, and a sprinkle of magic! Check out the features, their details, and where they stand:

Feature Details Status
🔄 Retry 🚀 Strategies: 1️⃣ Linear 2️⃣ Exponential Backoff 3️⃣ Fibonacci Backoff 4️⃣ Arithmetic Progression 🔧 Supports custom retry conditions Stable
⚡ Execute Execute operations with timeout and fallback—like a pro 💪 Stable
🧵 Parallel Exec ⚙️ Concurrent task execution with configurable limits 🚀 🛠️ Planned
🛡️ Circuit Breaker 🔥 Prevents cascading failures by halting operations when thresholds are breached 🚧 ⚠️ Thread Unsafe
📦 Memoize 💾 Future caching support for improved performance 🚀 🛠️ Planned
📜 Logging 🕵️ Comprehensive logging for debugging—like a detective 🔍 Stable
📚 More Examples 📖 Additional demos to inspire and illustrate usage ✨ 🛠️ Planned

Notes:

  • Supported Contexts: All features work seamlessly for both synchronous and asynchronous operations—flexibility is our middle name!

🏃‍♂️ Runtime Compatibility

This library plays nice with your favorite Rust async runtimes. The resilient_rs::asynchronous module has you covered with:

  • Tokio - Power up with Tokio’s async I/O and runtime
  • async-std - Keep it light with async-std’s sleek runtime
  • futures - Stick to the basics with the core futures crate and blocking execution

📦 How to Use resilient-rs

Here’s a quick example of how to use the resilient-rs crate in your Rust project.

1️⃣ Add resilient-rs to Your Cargo.toml

Add the following line to your Cargo.toml file:

[dependencies]
resilient-rs = "0.4.9" # Replace with the latest version

OR

cargo add resilient-rs

📖 Examples

Hover over the function you want to use in your IDE to see code documentation examples, or check out the code-examples folder for example usage of this crate.

🚀 Contributing

We welcome your contributions! Please check out our Contributing Guidelines to get started.