pub struct Event {Show 19 fields
pub global_position: u64,
pub tenant_id: String,
pub domain: String,
pub aggregate_type: String,
pub aggregate_id: String,
pub version: u64,
pub event_type: String,
pub payload: Vec<u8>,
pub command_id: String,
pub created_at: i64,
pub hash: Vec<u8>,
pub producer_sig: Option<Signature>,
pub context: Option<RequestContext>,
pub schema: u32,
pub vault_refs: Vec<String>,
pub erases: String,
pub origin_partition: String,
pub origin_position: u64,
pub deployment: String,
}Expand description
A stored event: a NewEvent of a worker, completed by the kernel when it committed it.
Fields§
§global_position: u64position in the whole log, from 1
tenant_id: String§domain: Stringalways the domain of the command that caused it
aggregate_type: Stringunqualified
aggregate_id: String§version: u64the aggregate’s version after this event, from 1
event_type: Stringunqualified: OrderPlaced
payload: Vec<u8>§command_id: Stringthe command that caused it
created_at: i64ms since epoch, when the kernel committed it
hash: Vec<u8>SHA-256 link of the hash chain, see SIGNING.md
producer_sig: Option<Signature>The worker’s signature over its result (kernable.v1.result); the same on every event of a command.
context: Option<RequestContext>of the command that caused the event
schema: u32version of the payload format of event_type, from 1
vault_refs: Vec<String>see NewEvent
erases: Stringsee NewEvent
origin_partition: StringAn event its tenant brought along when it moved here from another partition: where it was first committed. Listeners do not get these; the original is delivered where it is.
origin_position: u64§deployment: StringThe code version (deployment) of the worker that produced it, as its Register declared it; empty for a worker that declared none, and for the events the kernel writes itself (process cases). Hashed only when set (SIGNING.md).
Trait Implementations§
Source§impl Message for Event
impl Message for Event
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Eventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attribute>: Freeze,
PhantomData<String>: Freeze,
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Eventwhere
RawVecInner: Send,
impl Sync for Eventwhere
RawVecInner: Sync,
impl Unpin for Event
impl UnsafeUnpin for Eventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Eventwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request