pub struct SessionCoordinator { /* private fields */ }Expand description
Wraps a SessionWriter in an Arc and runs a background thread that
emits a Heartbeat event every 10 seconds. The handle’s Drop impl
stops the heartbeat thread and stamps ended_at defensively if
finish() was never called (crash/panic safety).
Mirrors zag’s SessionLogCoordinator
(zag-agent/src/session_log.rs:565).
Implementations§
Source§impl SessionCoordinator
impl SessionCoordinator
pub fn start(writer: SessionWriter) -> Self
pub fn writer(&self) -> Arc<SessionWriter>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionCoordinator
impl !RefUnwindSafe for SessionCoordinator
impl Send for SessionCoordinator
impl Sync for SessionCoordinator
impl Unpin for SessionCoordinator
impl UnsafeUnpin for SessionCoordinator
impl !UnwindSafe for SessionCoordinator
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