Expand description
HTTP client for intervals.icu API with rate limiting.
This module provides high-performance activity fetching with:
- Connection pooling for HTTP/2 multiplexing
- Dispatch rate limiting (spaces out request starts)
- Parallel fetching with configurable concurrency
- Automatic retry with exponential backoff on 429
Structs§
- Activity
Fetcher - High-performance activity fetcher
- Activity
MapResult - Result of fetching activity map data
- Download
Progress - Global progress state for FFI polling. Uses atomics to allow safe concurrent access from fetch tasks and FFI polls.
- MapBounds
- Map bounds for an activity
Functions§
- fetch_
activity_ maps_ sync - Synchronous wrapper for FFI - runs the async code on a tokio runtime Accepts a pre-formatted auth header (e.g., “Basic …” or “Bearer …”)
- finish_
download_ progress - Mark download as complete
- get_
download_ progress - Get current progress state (called by FFI)
- increment_
download_ progress - Increment completed counter after each activity fetches
- reset_
download_ progress - Reset progress counters at start of fetch operation
- start_
background_ fetch - Start a background fetch operation (returns immediately, doesn’t block) Call get_download_progress() to monitor progress Call take_background_fetch_results() when active becomes false to get results
- take_
background_ fetch_ results - Take the results from a completed background fetch Returns None if fetch is still in progress or no fetch was started Returns Some(results) and clears the storage
Type Aliases§
- Progress
Callback - Progress callback type