Expand description
HTTP-specific extensions for the seatbelt resilience middleware.
Each seatbelt middleware is generic over its input and output types.
This crate specializes them for HttpRequest /
Result<HttpResponse> and adds HTTP-aware
builder methods, all prefixed with http_.
§Supported middleware
Each middleware lives in its own feature-gated module with specialized type aliases and an extension trait:
| Module | Feature | Purpose |
|---|---|---|
retry | retry | Recovery classification, request cloning, request restoration from errors. |
timeout | timeout | Converts timeout events into HTTP-specific errors. |
hedging | hedging | Recovery classification and request cloning for tail-latency reduction. |
breaker | breaker | Recovery classification and rejected-request error handling. |
§Shared types
HttpRecovery: classifies HTTP responses as recoverable. By default, 5xx status codes,429 Too Many Requests, and request timeouts are treated as transient.HttpClone: selects which HTTP methods are eligible for cloning during retries and hedging (safe-only, idempotent, or all).HttpResilienceContext: the HTTP specialization ofResilienceContext.
Modules§
- breaker
breaker - HTTP-specific circuit breaker middleware.
- hedging
hedging - HTTP-specific hedging middleware.
- retry
retry - HTTP-specific retry middleware.
- timeout
timeout - HTTP-specific timeout middleware.
Structs§
- Http
Clone hedgingorretry - A strategy for cloning HTTP requests for retries or hedging.
- Http
Recovery breakerorhedgingorretry - Configuration for classifying the recovery information of HTTP responses.
Type Aliases§
- Http
Resilience Context - Shared configuration and runtime context for HTTP resilience middleware.