Current section

Files

Jump to
csh2fjhyll_kvasir_projector lib projection context.ex
Raw

lib/projection/context.ex

defmodule Kvasir.Projection.Context do
defmodule History.Entry do
@type t :: %__MODULE__{
start: UTCDateTime.t(),
stop: UTCDateTime.t(),
error: term,
stacktrace: false | Exception.stacktrace()
}
defstruct [:start, :stop, :error, :stacktrace]
end
@type t :: %__MODULE__{
projection: module,
projection_type: :global | :stateful,
history: [History.Entry.t()],
attempts: pos_integer(),
event: term,
received_at: UTCDateTime.t(),
error_at: nil | UTCDateTime.t()
}
defstruct [
:projection,
:projection_type,
:history,
:attempts,
:event,
:received_at,
:error_at
]
end