pub struct EventLog<'a> {
pub(super) conn: &'a Mutex<Connection>,
}Fields§
§conn: &'a Mutex<Connection>Implementations§
Source§impl<'a> EventLog<'a>
impl<'a> EventLog<'a>
Sourcepub fn append(&self, entry: &EventLogEntry) -> Result<i64>
pub fn append(&self, entry: &EventLogEntry) -> Result<i64>
Append a single entry. Returns the assigned seq. Validates the
payload parses as JSON before insert (a malformed row would
silently poison the replay tool — see EventLogEntry::payload
docstring).
Sourcepub fn last_seq(&self) -> Result<i64>
pub fn last_seq(&self) -> Result<i64>
Latest seq in the log. Useful for “Replay-From” handshake in RFC-0005 §4.3 and as a sanity check.
Sourcepub fn query_by_host(
&self,
host_id: &str,
limit: i64,
) -> Result<Vec<EventLogRow>>
pub fn query_by_host( &self, host_id: &str, limit: i64, ) -> Result<Vec<EventLogRow>>
Entries for a host, ordered by seq ascending. Used by the operator API and the replay tool.
Sourcepub fn query_by_rollout(
&self,
rollout_id: &str,
limit: i64,
) -> Result<Vec<EventLogRow>>
pub fn query_by_rollout( &self, rollout_id: &str, limit: i64, ) -> Result<Vec<EventLogRow>>
Entries for a rollout, ordered by seq ascending.
Sourcepub fn query_by_kind(
&self,
kind: EventLogKind,
limit: i64,
) -> Result<Vec<EventLogRow>>
pub fn query_by_kind( &self, kind: EventLogKind, limit: i64, ) -> Result<Vec<EventLogRow>>
Entries of a particular kind, ordered by seq ascending.
Auto Trait Implementations§
impl<'a> Freeze for EventLog<'a>
impl<'a> RefUnwindSafe for EventLog<'a>
impl<'a> Send for EventLog<'a>
impl<'a> Sync for EventLog<'a>
impl<'a> Unpin for EventLog<'a>
impl<'a> UnwindSafe for EventLog<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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