The routing of an append that has been resolved from an event source definition.
Resolution errors are returned as tuples so appends never send a partial request:
{:unknown_event_source, reference}{:event_stream_does_not_belong_to_event_source, source, stream}{:event_routing_contradicts_event_source, source, dimension, expected, actual}
Summary
Functions
The concurrency dimensions that apply to the append.
The event source name recorded as the EventSource metadata of the event.
Resolves an event source (module or name) and optional stream name against the registered event source modules.
The event source type to write on the event.
The event stream type to write on the event.
Types
@type t() :: %Chronicle.EventSources.Routing{ definition: Chronicle.EventSources.EventSourceDefinition.t(), stream: Chronicle.EventSources.EventStream.t() | nil }
Functions
@spec dimensions(t()) :: Chronicle.EventSources.ConcurrencyDimensions.t()
The concurrency dimensions that apply to the append.
The event source name recorded as the EventSource metadata of the event.
@spec resolve( [module()], module() | String.t(), String.t() | nil, String.t() | nil, String.t() | nil ) :: {:ok, t()} | {:error, term()}
Resolves an event source (module or name) and optional stream name against the registered event source modules.
Explicit source type / stream type values that contradict the definition are
rejected; empty, "Default" (source type) and "All" (stream type) values
mean "not specified".
The event source type to write on the event.
The event stream type to write on the event.