Skip to main content

Module session_persistence

Module session_persistence 

Source
Expand description

Session Save/Load Persistence - Phase 15 H4

Provides complete session state persistence using the ResumeData JSON format (.aria2 files). This module bridges the ActiveSessionManager with the ResumeData serialization system for cross-restart download resumption.

§Architecture

session_persistence.rs (this file)
  ├── SessionPersistence struct - High-level save/load coordinator
  ├── save_state() - Serialize all commands to .aria2 files
  ├── load_state() - Restore commands from .aria2 files
  ├── start_auto_save() - Background periodic save task
  └── signal_handler() - SIGTERM/SIGINT graceful shutdown

Dependencies:
  resume_data.rs - ResumeData, UriState, ChecksumInfo structs
  active_session.rs - ActiveSessionManager for session file I/O

Structs§

DhtNodeInfo
Information about a single DHT node in the routing table.
DhtStateSnapshot
Snapshot of DHT (Distributed Hash Table) routing state for persistence.
SessionPersistence
High-level session persistence manager