Jido.Bus.RecordedSignal (Jido v1.1.0-rc.1)
View SourceRecordedSignal Helper struct to store recorded signal metadata
Summary
Functions
Enrich the signal's metadata with fields from the RecordedSignal
struct and
any additional metadata passed as an option.
Map an Jido.Bus.RecordedSignal
struct to its signal data.
Map a list of Jido.Bus.RecordedSignal
structs to their signal data.
Types
@type causation_id() :: uuid() | nil
@type correlation_id() :: uuid() | nil
@type created_at() :: DateTime.t()
@type data() :: domain_signal()
@type domain_signal() :: struct()
@type enriched_metadata() :: %{ :signal_id => signal_id(), :signal_number => signal_number(), :stream_id => stream_id(), :stream_version => stream_version(), :correlation_id => correlation_id(), :causation_id => causation_id(), :created_at => created_at(), optional(atom()) => term(), optional(String.t()) => term() }
@type jido_metadata() :: map()
@type signal() :: struct()
@type signal_id() :: uuid()
@type signal_number() :: non_neg_integer()
@type stream_id() :: String.t()
@type stream_version() :: non_neg_integer()
@type t() :: %Jido.Bus.RecordedSignal{ causation_id: causation_id(), correlation_id: correlation_id(), created_at: created_at(), data: data(), jido_metadata: jido_metadata(), signal_id: signal_id(), signal_number: signal_number(), stream_id: stream_id(), stream_version: stream_version(), type: type() }
@type type() :: String.t()
@type uuid() :: String.t()
Functions
@spec enrich_metadata(t(), [{:additional_metadata, map()}]) :: enriched_metadata()
Enrich the signal's metadata with fields from the RecordedSignal
struct and
any additional metadata passed as an option.
Map an Jido.Bus.RecordedSignal
struct to its signal data.
Map a list of Jido.Bus.RecordedSignal
structs to their signal data.