Jizoku.ReadModel.ContinuationChain (jizoku v0.4.0)

Copy Markdown View Source

Bounded, read-only traversal of durable continue-as-new lineage.

Traversal loads at most max_hops + 1 run projections and never follows child-run or replay lineage. The default limit is configured through config :jizoku, :continuation_history.

Summary

Functions

Traverses continuation lineage from one run with an explicit upper bound.

Types

direction()

@type direction() :: :backward | :forward

run_summary()

@type run_summary() :: %{
  run_id: String.t(),
  definition_version: String.t() | nil,
  status: atom(),
  terminal_status: atom() | nil,
  thread_revision: non_neg_integer(),
  continued_from: map() | nil,
  continued_to: map() | nil
}

t()

@type t() :: %Jizoku.ReadModel.ContinuationChain{
  direction: direction(),
  hops: non_neg_integer(),
  max_hops: pos_integer(),
  partition: String.t() | nil,
  run_id: String.t(),
  runs: [run_summary()],
  truncated?: boolean(),
  warnings: [map()]
}

Functions

inspect(storage, run_id, opts \\ [])

@spec inspect(Jizoku.Runtime.Journal.storage_config(), String.t(), keyword()) ::
  {:ok, t()} | {:error, term()}

Traverses continuation lineage from one run with an explicit upper bound.

:direction defaults to :backward, which follows predecessor links. :max_hops defaults to the configured continuation-history limit.