upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sync/mod.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 11:33:03 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 11:33:03 +0000
commit09d9771acaffdc6e798cc32d2a68e6d46a323d3a (patch)
treec580f49311e81a9348e7b08d761708b93226b388 /src/sync/mod.rs
parent08eba888fe510896f1863be6f2b5a72a91616975 (diff)
Add ThrottleManager for cross-domain rate limiting
Implements ThrottleManager which manages all per-domain DomainThrottle instances and provides: - Throttle status checking via is_throttled() for sync URL selection - Request tracking via start_request()/complete_request() - Identifier queue management via enqueue_identifier() - Automatic domain throttle creation on first access - Thread-safe access via DashMap with Mutex-wrapped throttles The manager uses the configured max_concurrent and max_per_minute limits for all domains. Trigger-based queue processing (set_context, process_queued_identifier) will be added after SyncContext is available. Tests verify: - is_throttled reflects domain capacity correctly - enqueue_identifier creates domain throttle if needed - start_request creates domain throttle if needed
Diffstat (limited to 'src/sync/mod.rs')
0 files changed, 0 insertions, 0 deletions