Skip to main content

Crate rskit_resilience

Crate rskit_resilience 

Source
Expand description

Fault-tolerance primitives: retry, circuit breaker, bulkhead, and rate limiter.

Re-exports§

pub use bulkhead::Bulkhead;
pub use bulkhead::BulkheadConfig;
pub use circuit_breaker::CbConfig;
pub use circuit_breaker::CbState;
pub use circuit_breaker::CircuitBreaker;
pub use policy::Policy;
pub use rate_limiter::RateLimiter;
pub use rate_limiter::RateLimiterConfig;
pub use retry::BackoffKind;
pub use retry::ConstantBackoff;
pub use retry::LinearBackoff;
pub use retry::RetryError;
pub use retry::RetryPolicy;
pub use retry::RetryPreset;
pub use layers::BulkheadLayer;
pub use layers::CircuitBreakerLayer;
pub use layers::RateLimitLayer;
pub use layers::RetryLayer;
pub use layers::TimeoutLayer;

Modules§

bulkhead
Semaphore-based concurrency limiter.
circuit_breaker
Asynchronous circuit breaker with closed / open / half-open states.
layers
tower::Layer wrappers for each resilience primitive. tower::Layer adapters for resilience capabilities.
policy
High-level composition API for resilience primitives.
rate_limiter
Token-bucket rate limiter backed by governor.
retry
Exponential, constant, and linear back-off retry policies.