Oi. Dispatch. Drafting
(oi v0.4.0)
Copy Markdown
Temporary result store for a single dispatch pass.
Holds computed outputs keyed by Orchid io_key (e.g. "pred_step|result"),
which is already globally unique. Workers read dependencies from here;
the dispatcher merges per-stage deltas back after each barrier.
Summary
Functions
merge single delta(%{io_key => Orchid.Param}).
按 keys 投影出一个 param_map。区分『缺失』和『值为 nil』: 缺失返回 error,nil 是合法值照常返回。
Types
@type io_key() :: Orchid.Step.io_key()
@type t() :: %Oi.Dispatch.Drafting{ interventions: term(), memory: %{required(io_key()) => Orchid.Param.t()} }
Functions
@spec fetch(t(), io_key()) :: {:ok, Orchid.Param.t()} | :error
@spec new() :: t()
@spec new(%{required(io_key()) => Orchid.Param.t()}) :: t()
@spec put(t(), %{required(io_key()) => Orchid.Param.t()}) :: t()
merge single delta(%{io_key => Orchid.Param}).
@spec resolve_many(t(), [io_key()]) :: {:ok, %{required(io_key()) => Orchid.Param.t()}} | {:error, {:unresolved, [io_key()]}}
按 keys 投影出一个 param_map。区分『缺失』和『值为 nil』: 缺失返回 error,nil 是合法值照常返回。
@spec take(t(), [io_key()]) :: %{required(io_key()) => Orchid.Param.t()}