Skip to main content

Module limits

Module limits 

Source
Expand description

Per-backend rate-limit table (RATE CAPS ONLY).

BackendLimits carries the published per-backend request-rate and bandwidth ceilings for each storage scheme so the transfer layer can pace requests/bytes to stay under the backend’s documented limits and avoid provider-side throttling (HTTP 429 / SlowDown / rateLimitExceeded).

This module is deliberately self-contained: it holds caps only and has NO notion of retry/backoff (that policy is global and lives in a separate module added by a later gate). It depends on nothing beyond std and the scheme strings the router already uses.

The caps are matched on the canonical scheme/adapter names produced by crate::router::Adapter::name"file", "s3", "b2", "gcs" (the gs:// URL scheme resolves to the "gcs" adapter) — plus any unknown / external scheme, which is treated as unlimited.

Structs§

BackendLimits
Published rate caps for a single storage backend.

Functions§

for_scheme
Returns the published BackendLimits for a storage scheme.