Skip to main content

Module resilience

Module resilience 

Source
Expand description

Lock-free circuit breaker + the BreakerOpen sentinel surfaced when the breaker is OPEN.

The breaker is static-constructible: CircuitBreaker::const_new builds one in const context so the #[circuit_breaker(...)] attribute macro can place a per-method breaker behind a static.

Re-exports§

pub use bulkhead::Bulkhead;
pub use distributed_rate_limit::DistributedRateLimit;
pub use distributed_rate_limit::FailurePolicy;
pub use distributed_rate_limit::RateDecision;
pub use distributed_rate_limit::RateLimitBackend;
pub use dlock::DLockBackend;
pub use dlock::DistributedLock;
pub use dlock::LockGuard;
pub use rate_limit::RateLimit;

Modules§

bulkhead
Bulkhead — bounded concurrency per endpoint group.
distributed_rate_limit
Cluster-wide rate limiting behind a pluggable async backend.
dlock
Distributed lock with fencing tokens — cluster-wide single-holder sections.
rate_limit
Lock-free fixed-window rate limiter.
timeout
Route-level deadline enforcement for #[Timeout("…")].

Structs§

BreakerOpen
Returned when the breaker rejects a call because it is OPEN.
CircuitBreaker

Attribute Macros§

circuit_breaker
#[circuit_breaker(..)] — wrap a method in a circuit breaker.