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