Chronicle.ReadModels.DecisionRead (cratis_chronicle v3.16.1)

Copy Markdown View Source

A read model instance together with the concurrency guard that protects the decision made from it.

Returned by Chronicle.ReadModels.DecisionReads.get/3 and get_detached/3 (and their stream variants). Never built directly - the struct's fields are internal shape, read by Chronicle.Transactions.UnitOfWork.add_decision_read/2 and Chronicle.EventSequences.EventLog at commit time, not part of the public contract.

Summary

Types

stream_scope()

@type stream_scope() :: %{
  event_source_id: String.t(),
  event_stream_type: String.t(),
  event_stream_id: String.t(),
  event_source_type: String.t()
}

t()

@type t() :: %Chronicle.ReadModels.DecisionRead{
  event_sequence_id: String.t(),
  event_source_id: String.t(),
  event_store: String.t(),
  event_types: [module()],
  instance: struct() | nil,
  key: String.t(),
  namespace: String.t(),
  read_model: module(),
  scope: Chronicle.Events.ConcurrencyScope.t(),
  stream: stream_scope() | nil
}