Backplane.AgentRuntime.RunTree (backplane_agent_runtime v1.6.0)

Copy Markdown

Run-owned child relationships and cancellation propagation.

Owner-bound children are cancelled with their owner. Hosted agents and unrelated peer work are never cancelled because of another run.

Summary

Types

t()

@type t() :: map()

Functions

add_child(tree, parent_run_id, child)

@spec add_child(t(), String.t(), map()) ::
  {:ok, t(), %{run_id: String.t(), depth: non_neg_integer()}}
  | {:error, Backplane.AgentRuntime.Error.t()}

cancel(tree, run_id)

@spec cancel(t(), String.t()) ::
  {:ok, t(), %{cancelled: list(), untouched: list()}}
  | {:error, Backplane.AgentRuntime.Error.t()}

new(root_run_id, policy)

@spec new(String.t(), map()) ::
  {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}