Insider.Sentinel.Sandbox.Executor (Insider Lab v0.1.0)

Copy Markdown View Source

Fixed-capacity supervisor for provider-driven disposable target runs.

Provider modules are an explicit trusted allowlist configured at startup.

Summary

Types

handle()

@type handle() :: %{pid: pid(), token: reference()}

Functions

await(arg1, timeout)

@spec await(handle(), timeout()) ::
  Insider.Protocol.Result.t() | {:error, Insider.Protocol.Error.t()}

cancel(handle, timeout \\ 1000)

@spec cancel(handle(), timeout()) :: :ok | {:error, Insider.Protocol.Error.t()}

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

counts(executor)

@spec counts(Supervisor.supervisor()) ::
  {:ok, %{active: non_neg_integer(), quarantined: non_neg_integer()}}
  | {:error, Insider.Protocol.Error.t()}

run(executor, target, options)

start_link(options)

@spec start_link(keyword()) :: Supervisor.on_start()

start_run(executor, target, options)