pub struct RunLogWriter { /* private fields */ }Expand description
Append-only writer shared by the stdout and stderr reader threads of one run. Sequence numbers are capture order across both pipes.
Implementations§
Source§impl RunLogWriter
impl RunLogWriter
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Opens (creating directories as needed) the run’s output log and resumes sequence numbering after any records already present, so a restarted daemon appends instead of renumbering.
Sourcepub fn append(
&self,
source: OutputSource,
stage: Option<&str>,
attempt: Option<u32>,
stream: OutputStream,
bytes: &[u8],
) -> Result<u64>
pub fn append( &self, source: OutputSource, stage: Option<&str>, attempt: Option<u32>, stream: OutputStream, bytes: &[u8], ) -> Result<u64>
Appends one chunk and durably flushes it. Capture must be on disk before exit evidence claims it is complete.
Sourcepub fn append_at(
&self,
timestamp_ms: i64,
source: OutputSource,
stage: Option<&str>,
attempt: Option<u32>,
stream: OutputStream,
bytes: &[u8],
) -> Result<u64>
pub fn append_at( &self, timestamp_ms: i64, source: OutputSource, stage: Option<&str>, attempt: Option<u32>, stream: OutputStream, bytes: &[u8], ) -> Result<u64>
Appends a chunk with a caller-supplied clock instant. Agent output uses the daemon clock so scheduler deadlines and persisted output agree in tests as well as production.
Trait Implementations§
Source§impl Clone for RunLogWriter
impl Clone for RunLogWriter
Source§fn clone(&self) -> RunLogWriter
fn clone(&self) -> RunLogWriter
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 RunLogWriter
impl RefUnwindSafe for RunLogWriter
impl Send for RunLogWriter
impl Sync for RunLogWriter
impl Unpin for RunLogWriter
impl UnsafeUnpin for RunLogWriter
impl UnwindSafe for RunLogWriter
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