Skip to content

Implement Download Manager #6

@mirkobrombin

Description

@mirkobrombin
  • DownloadManager manages queue, workers, config, and global state
  • DownloadTask with URL, destination path, state, progress, and retries
  • Thread-safe queue (e.g. crossbeam,tokio::sync)
  • Configurable workers, auto or manual start
  • Parallel downloads respecting max workers via semaphore or bounded channel
  • Add one or more URLs with optional custom path for dstination
  • Track progress: bytes downloaded, total, speed, ETA (clients must be able to subscribe to live updates)
  • Retry on failure with basic backoff
  • Cancel single task or all tasks
  • Temp file handling and atomic move on completion
  • Export/import queue state for crash recovery
  • Support event/callback hooks on task state changes
  • Allow injecting custom download backends (HTTP client abstraction)
  • (bonus) Might be useful to expose clean API for external crates (this might be a dedicated library, actually)

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions