pub enum CoreEvent {
Show 24 variants
MetricsUpdate(HostId, Metrics),
HostStatusChanged(HostId, ConnectionStatus),
FileTransferProgress(TransferId, u64, u64),
Error(String),
HostsLoaded(Vec<Host>),
SnippetsLoaded(Vec<Snippet>),
SnippetResult {
host_name: String,
snippet_name: String,
output: Result<String, String>,
},
FileDirListed {
path: String,
entries: Vec<FileEntry>,
},
LocalDirListed {
path: String,
entries: Vec<FileEntry>,
},
SftpConnected {
host_name: String,
},
SftpManagerReady {
host_name: String,
manager: Box<SftpManager>,
},
SftpDisconnected {
reason: String,
},
FilePreviewReady {
path: String,
content: String,
},
SftpOpDone {
result: Result<(), String>,
},
PtyOutput(SessionId),
PtyExited(SessionId),
DiscoveryQuickScanDone(HostId, Vec<DetectedService>),
DiscoveryFailed(HostId, String),
KeySetupProgress(HostId, KeySetupStep),
KeySetupComplete(HostId, PathBuf),
KeySetupFailed(HostId, String),
KeySetupRollback(HostId, String),
UpdateAvailable(UpdateInfo),
UpdateInstalled(Result<(), String>),
}Expand description
Domain events produced by the SSH engine, config loaders, and the update checker. Background tasks send these over a dedicated channel; the frontend wraps them into its own event stream.
Variants§
MetricsUpdate(HostId, Metrics)
SSH metrics received from a background task.
HostStatusChanged(HostId, ConnectionStatus)
Connection status changed for a host (reported by metrics poller).
FileTransferProgress(TransferId, u64, u64)
File transfer progress: (transfer_id, bytes_done, bytes_total).
Error(String)
An error message surfaced to the user.
HostsLoaded(Vec<Host>)
Host list loaded from disk / SSH config in a background task.
SnippetsLoaded(Vec<Snippet>)
Snippet list loaded from disk in a background task.
SnippetResult
Result of executing a snippet or quick-execute command on one host.
output is Ok(stdout) or Err(error_message).
FileDirListed
Remote directory listing completed.
LocalDirListed
Local directory listing completed.
SftpConnected
SFTP session successfully established.
SftpManagerReady
SFTP manager ready with established connection (contains SftpManager handle).
SftpDisconnected
SFTP session closed or failed.
FilePreviewReady
Preview bytes available for a file.
SftpOpDone
A mutating SFTP operation (delete, mkdir, rename, upload, download) finished.
PtyOutput(SessionId)
A PTY session produced output. The bytes are already parsed into the
session’s Arc<Mutex<vt100::Parser>>; this event is a lightweight
render-nudge so the main loop can update has_activity state without
copying bulk output data through the channel.
PtyExited(SessionId)
The PTY child process exited (reader thread reached EOF or I/O error).
DiscoveryQuickScanDone(HostId, Vec<DetectedService>)
Quick scan completed for a host, services detected.
DiscoveryFailed(HostId, String)
Discovery failed for a host with an error message.
KeySetupProgress(HostId, KeySetupStep)
Progress update from key setup (host_id, current step, total steps).
KeySetupComplete(HostId, PathBuf)
Key setup completed successfully (host_id, private_key_path).
KeySetupFailed(HostId, String)
Key setup failed with an error (host_id, error_message).
KeySetupRollback(HostId, String)
Emergency rollback was triggered (host_id, rollback_result).
UpdateAvailable(UpdateInfo)
A newer release was found on GitHub at startup.
UpdateInstalled(Result<(), String>)
A self-update finished — Ok on success, Err with a message on failure.