Expand description
Rolling-window transfer quotas and a queue of content waiting for budget.
iroh-blobs has no per-request rate limiter and iroh-docs downloads eagerly, so instead of trying to throttle a transfer in flight this module implements a download policy in the spirit of qBittorrent: transfers are queued and only start when their full size fits inside every configured per-hour, per-day, and per-month byte quota. Sharing (upload) is bounded by pausing the folder’s live session when an upload quota would be exceeded.
Structs§
- Pending
Transfer - A blob waiting for download budget.
- Transfer
Budget - Rolling byte accounting against a set of
TransferLimits. - Transfer
Limits - Parsed per-direction quotas.
- Transfer
Limits Config - Serializable
[transfer_limits]configuration. - Transfer
Queue - Size-prioritized queue of blobs waiting for their download quota.
- Transfer
Quota - Parsed byte quotas for one direction.
Nonemeans unlimited.
Enums§
- Direction
- Which side of a transfer a quota applies to.
Constants§
- WINDOW_
DAY - Rolling window for the per-day quota.
- WINDOW_
HOUR - Rolling window for the per-hour quota.
- WINDOW_
MONTH - Rolling window for the per-month quota (30 days).