pub struct LocalLogSpooler { /* private fields */ }Expand description
Local-only log spooler.
Phase 1 is responsible for local directory existence and deterministic
path generation. Later phases will stream remote stdout/stderr into these
files and use the registry to serve check_process.
Implementations§
Source§impl LocalLogSpooler
impl LocalLogSpooler
pub fn new(base_dir: PathBuf) -> Self
pub fn new_default() -> Self
pub fn base_dir(&self) -> &Path
pub async fn ensure_dir(&self) -> Result<()>
pub fn log_path_for(&self, job_id: &str) -> Result<PathBuf>
pub fn state_path_for(&self, job_id: &str) -> Result<PathBuf>
pub async fn persist_job_state(&self, job: &JobState) -> Result<()>
pub async fn load_job_state(&self, job_id: &str) -> Result<Option<JobState>>
pub async fn cleanup_old_logs(&self, max_age: Duration) -> Result<usize>
Trait Implementations§
Source§impl Clone for LocalLogSpooler
impl Clone for LocalLogSpooler
Source§fn clone(&self) -> LocalLogSpooler
fn clone(&self) -> LocalLogSpooler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalLogSpooler
impl RefUnwindSafe for LocalLogSpooler
impl Send for LocalLogSpooler
impl Sync for LocalLogSpooler
impl Unpin for LocalLogSpooler
impl UnsafeUnpin for LocalLogSpooler
impl UnwindSafe for LocalLogSpooler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more