Raxol.System.Updater.State (Raxol v2.0.1)
View SourceRefactored System Updater State module with GenServer-based state management.
This module provides backward compatibility while eliminating Process dictionary usage. All state is now managed through the Updater.State.Server GenServer.
Migration Notes
This module replaces direct Process dictionary usage with supervised GenServer state. The API remains the same, but the implementation is now OTP-compliant and more robust.
Features Maintained
- Update settings management
- Progress tracking for active updates
- Update history and statistics
- Error tracking and logging
- Auto-update configuration
Summary
Functions
Cancel the current update operation.
Clear any update error.
Clear the update history.
Clear the update log.
Clear update statistics.
Returns the default update settings. This is provided for backward compatibility.
Get any error from the last update attempt.
Get the update history.
Get the update log.
Get the current update progress (0-100).
Get the current update settings.
Get update statistics.
Log an update message.
Enable or disable automatic update checking.
Set an update error.
Set the update progress.
Set the update settings.
Update the statistics.
Functions
Cancel the current update operation.
Clear any update error.
Clear the update history.
Clear the update log.
Clear update statistics.
@spec default_update_settings() :: %{ auto_update: boolean(), check_interval: pos_integer(), update_channel: atom(), notify_on_update: boolean(), download_path: String.t(), backup_path: String.t(), max_backups: pos_integer(), retry_count: non_neg_integer(), retry_delay: pos_integer(), timeout: pos_integer(), verify_checksums: boolean(), require_confirmation: boolean() }
Returns the default update settings. This is provided for backward compatibility.
Get any error from the last update attempt.
Get the update history.
Get the update log.
Get the current update progress (0-100).
Get the current update settings.
Get update statistics.
Log an update message.
Enable or disable automatic update checking.
Set an update error.
Set the update progress.
Set the update settings.
Update the statistics.