Skip to main content

Crate fusillade

Crate fusillade 

Source
Expand description

Batching system for HTTP requests with retry logic and concurrency control.

This crate provides ‘managers’ that accept submitted HTTP requests, and provides an API for checking their status over time. Behind the scenes, a daemon processes these requests in batches, retrying failed requests with exponential backoff and enforcing concurrency limits

Batching system with PostgreSQL storage and background daemon for processing requests.

Re-exports§

pub use daemon::Daemon;
pub use daemon::DaemonConfig;
pub use daemon::ModelEscalationConfig;
pub use error::FusilladeError;
pub use error::Result;
pub use http::HttpClient;
pub use http::HttpResponse;
pub use http::MockHttpClient;
pub use http::ReqwestHttpClient;
pub use http::StreamEvent;
pub use http::StreamEventCallback;
pub use http::StreamReassembler;
pub use manager::postgres::PostgresRequestManager;
pub use manager::response_step::PostgresResponseStepManager;
pub use manager::DaemonExecutor;
pub use manager::Storage;
pub use processor::CancellationFuture;
pub use processor::DefaultRequestProcessor;
pub use processor::RequestProcessor;
pub use processor::ShouldRetry;
pub use response_step::CreateStepInput;
pub use response_step::ResponseStep;
pub use response_step::ResponseStepStore;
pub use response_step::StepId;
pub use response_step::StepKind;
pub use response_step::StepState;
pub use batch::*;
pub use request::*;

Modules§

batch
File and batch types for grouping requests.
bg_errors
Unified background-error metric and log for the fusillade daemon.
daemon
Daemon for processing batched requests with per-model concurrency control.
error
Error types for the batching system.
http
HTTP client abstraction for making requests.
manager
Main traits for the batching system.
processor
Per-row processing hook for the daemon.
request
Request aggregate - domain model and state transitions.
response_step
Response step storage primitives for multi-step Open Responses orchestration.

Macros§

background_error
Record a daemon background failure: increment the metric AND emit a tracing event, from one site. Severity is a literal tier token: Critical (error! + pages), Error (error!, no page), Warning (warn!, no page). reason must be a &'static str literal; trailing tokens are forwarded to tracing as fields and message.

Structs§

TestDbPools
Test pool provider with read-only replica enforcement.

Traits§

PoolProvider
Trait for providing database pools with read/write routing.

Functions§

migrator
Get the fusillade database migrator