ssh_mcp/background/
mod.rs1pub mod job;
9pub(crate) mod marker;
10pub mod registry;
11pub(crate) mod response;
12pub mod spooler;
13pub mod stream;
14pub(crate) mod transfer;
15pub(crate) mod wrapper;
16
17pub use job::{JobState, JobStatus, SharedJobState};
18pub use registry::JobRegistry;
19pub use spooler::LocalLogSpooler;
20pub use stream::OutputStreamer;
21
22use thiserror::Error;
23
24#[derive(Debug, Error)]
26pub enum BackgroundError {
27 #[error("io error: {0}")]
28 Io(#[from] std::io::Error),
29
30 #[error("invalid job id: {job_id}")]
31 InvalidJobId { job_id: String },
32
33 #[error("job not found: {job_id}")]
34 JobNotFound { job_id: String },
35
36 #[error("invalid job state: {message}")]
37 InvalidState { message: &'static str },
38
39 #[error("time error: {0}")]
40 Time(#[from] std::time::SystemTimeError),
41}
42
43pub type Result<T> = std::result::Result<T, BackgroundError>;