pub struct TailedEvent {
pub node_id: u32,
pub file_name: String,
pub byte_offset: u64,
pub event: LogEvent,
}Expand description
An event together with where it came from — everything the sink needs to build a stable _id.
Fields§
§node_id: u32§file_name: StringBare log filename, e.g. ant-node.2026-08-19.log.
byte_offset: u64Byte position of the event’s first line within that file.
event: LogEventImplementations§
Source§impl TailedEvent
impl TailedEvent
Sourcepub fn document_id(&self, installation_id: &str) -> String
pub fn document_id(&self, installation_id: &str) -> String
The document _id this event will be written under.
Deterministic in the four things that identify the event uniquely — which installation,
which node, which file, which byte — so that replaying a batch after a transport failure
lands on the same _id and is rejected as a duplicate instead of writing a second copy.
installation_id is not optional padding. Node id, filename and byte offset are all local
values: every participant has a node 1, writing the same daily filename, whose first line
starts at offset 0. Since all of them write into one shared daily index and a 409 counts as
delivered, omitting the installation namespace would make the first event of each day from
each node collide across the whole cohort, and every loser would be silently discarded.
Trait Implementations§
Source§impl Clone for TailedEvent
impl Clone for TailedEvent
Source§fn clone(&self) -> TailedEvent
fn clone(&self) -> TailedEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TailedEvent
impl Debug for TailedEvent
impl Eq for TailedEvent
Source§impl PartialEq for TailedEvent
impl PartialEq for TailedEvent
impl StructuralPartialEq for TailedEvent
Auto Trait Implementations§
impl Freeze for TailedEvent
impl RefUnwindSafe for TailedEvent
impl Send for TailedEvent
impl Sync for TailedEvent
impl Unpin for TailedEvent
impl UnsafeUnpin for TailedEvent
impl UnwindSafe for TailedEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more