Portable event envelope whose owner is fixed at Instance admission time.
Origins are evidence; they never select the Definition that consumes an event. A continuation owns replies, policy answers and operational progress. Events without a continuation are owned by the active Definition after the admission and schema-compatibility checks have succeeded.
Summary
Functions
Applies the sequencer-owned admission fields to a pending envelope.
Returns true only after the Instance sequencer admitted or quarantined the event.
Returns the event classes understood by this release.
Decodes and validates canonical Event Envelope bytes.
Encodes an envelope into canonical portable bytes.
Restores and verifies an envelope from decoded canonical data.
Returns a digest of fields supplied before Instance admission.
Builds and validates a pending or admitted event envelope.
Builds an envelope or raises with its stable validation reason.
Returns the Event Envelope schema version.
Returns portable canonical data.
Types
@type continuation_ref() :: Spectre.Run.Ref.t() | Spectre.Operation.Ref.t() | nil
@type event_class() ::
:input
| :reply
| :policy_answer
| :flow_progress
| :flow_completion
| :work_progress
| :work_completion
| :vigil_progress
| :vigil_completion
| :global
@type status() :: :pending | :admitted | :quarantined
@type t() :: %Spectre.Event.Envelope{ admission_receipt: String.t() | nil, admission_revision: pos_integer() | nil, admitted_activation_generation: non_neg_integer() | nil, admitted_at: non_neg_integer() | nil, authenticity: map(), authority_epoch: non_neg_integer() | nil, causation_id: String.t() | nil, class_ref: String.t(), continuation_ref: continuation_ref(), correlation_id: String.t(), emitted_at: non_neg_integer(), event_class: event_class(), id: String.t(), origin_definition_ref: Spectre.Definition.Ref.t() | nil, owner_definition_ref: Spectre.Definition.Ref.t() | nil, owner_fencing_token: pos_integer() | nil, payload: term(), payload_schema_ref: String.t(), provenance: map(), quarantine_reason: term(), schema_version: pos_integer(), status: status() }
Functions
Applies the sequencer-owned admission fields to a pending envelope.
Returns true only after the Instance sequencer admitted or quarantined the event.
@spec classes() :: [event_class()]
Returns the event classes understood by this release.
Decodes and validates canonical Event Envelope bytes.
Encodes an envelope into canonical portable bytes.
Restores and verifies an envelope from decoded canonical data.
Returns a digest of fields supplied before Instance admission.
Builds and validates a pending or admitted event envelope.
Builds an envelope or raises with its stable validation reason.
@spec schema_version() :: pos_integer()
Returns the Event Envelope schema version.
Returns portable canonical data.