Docket.Checkpoint (docket v0.1.1)

Copy Markdown View Source

Read-only description of an already committed runtime transition.

Production backends persist the run, events, and scheduling state directly inside their transaction. A checkpoint is constructed only after that transaction succeeds and may be delivered to Docket.Checkpoint.Observer callbacks. Observers cannot veto or participate in persistence.

Docket.Test also returns checkpoint values so processless graph-semantics tests can inspect transition order and contents.

Summary

Types

t()

@type t() :: %Docket.Checkpoint{
  created_at: DateTime.t(),
  events: [Docket.Event.t()],
  metadata: map(),
  run: Docket.Run.t(),
  seq: pos_integer(),
  type: type()
}

type()

@type type() ::
  :run_initialized
  | :step_committed
  | :retry_scheduled
  | :interrupt_requested
  | :interrupt_resolved
  | :run_completed
  | :run_failed
  | :run_cancelled