Pixir.Delegate.OwnerSupervisor (pixir v0.1.7)

Copy Markdown View Source

Dynamic supervisor and lookup surface for live Delegate owners.

Delegate owner residency is intentionally scoped to the current BEAM runtime in this slice. The registry lets start, status, and cancel find live capability while the runtime is alive; durable Session Logs remain the source of truth after restart or escript exit.

Summary

Functions

Cancel live Delegate work through the owner when reachable.

Application child spec.

Lookup a Delegate owner by delegate id or parent Session id.

Return live owner state when the current runtime owns the handle.

Start a live owner for a validated Delegate spec.

Start the Delegate owner supervisor.

Functions

cancel(handle, opts \\ [])

@spec cancel(
  map(),
  keyword()
) :: {:ok, map()} | {:error, :not_found | map()}

Cancel live Delegate work through the owner when reachable.

child_spec(arg)

Application child spec.

lookup(handle)

@spec lookup(map()) :: {:ok, pid()} | {:error, :not_found}

Lookup a Delegate owner by delegate id or parent Session id.

owner_state(handle)

@spec owner_state(map()) :: {:ok, map()} | {:error, :not_found}

Return live owner state when the current runtime owns the handle.

start_delegate(request, spec, spec_meta, opts \\ [])

@spec start_delegate(map(), map(), map(), keyword()) :: {:ok, map()} | {:error, map()}

Start a live owner for a validated Delegate spec.

start_link(opts \\ [])

Start the Delegate owner supervisor.