Synapse.Workflow.Persistence behaviour (Synapse v0.1.1)
View SourceBehaviour + helpers for persisting workflow execution snapshots.
Implementations (e.g., Postgres) store durable snapshots so workflows can be resumed after failures.
Summary
Types
@type request_id() :: String.t()
Callbacks
@callback delete_snapshot( request_id(), keyword() ) :: :ok | {:error, term()}
@callback get_snapshot( request_id(), keyword() ) :: {:ok, Synapse.Workflow.Persistence.Snapshot.t()} | {:error, :not_found | term()}
@callback upsert_snapshot( Synapse.Workflow.Persistence.Snapshot.t(), keyword() ) :: :ok | {:error, term()}