Typed Flow/Work exchange carried as portable data.
A handoff names stable Flow or Work IDs and an exact Definition Ref. It cannot contain modules, callbacks or MFAs and does not start anything by itself. The host admits it through the appropriate runtime API.
Summary
Functions
Returns a portable event for a Flow-target handoff.
Builds a typed Flow-to-Work handoff.
Restores a handoff and verifies its digest.
Builds a closed typed handoff.
Returns the complete portable handoff representation.
Verifies that a Work-target handoff addresses an exact materialization.
Builds a typed Work-to-Flow handoff event.
Builds a typed Work-to-Work handoff.
Types
@type endpoint() :: %{kind: :flow | :work, ref: String.t()}
Functions
Returns a portable event for a Flow-target handoff.
@spec flow_to_work( String.t() | Spectre.Definition.Ref.t(), term(), term(), term(), keyword() ) :: {:ok, t()} | {:error, term()}
Builds a typed Flow-to-Work handoff.
Restores a handoff and verifies its digest.
Builds a closed typed handoff.
Returns the complete portable handoff representation.
@spec validate_target(t(), Spectre.Execution.Materialization.t()) :: :ok | {:error, term()}
Verifies that a Work-target handoff addresses an exact materialization.
@spec work_to_flow( String.t() | Spectre.Definition.Ref.t(), term(), term(), term(), keyword() ) :: {:ok, t()} | {:error, term()}
Builds a typed Work-to-Flow handoff event.
@spec work_to_work( String.t() | Spectre.Definition.Ref.t(), term(), term(), term(), keyword() ) :: {:ok, t()} | {:error, term()}
Builds a typed Work-to-Work handoff.