# `Insider.Scenario.Executor`
[🔗](https://github.com/hiivemarkets/insider/blob/v0.1.0/tools/insider_lab/lib/insider/scenario/executor.ex#L1)

Fixed-capacity admission for supervised scenario runs.

`cancel/1` stops future scenario work and asks the runner to perform its
declared cleanup reset. It never represents cancellation as rollback.

# `handle`

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

# `await`

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

# `cancel`

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

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `run`

```elixir
@spec run(Supervisor.supervisor(), Insider.Scenario.t(), [module()], keyword()) ::
  Insider.Protocol.Result.t() | {:error, Insider.Protocol.Error.t()}
```

# `start_link`

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

# `start_run`

```elixir
@spec start_run(Supervisor.supervisor(), Insider.Scenario.t(), [module()], keyword()) ::
  {:ok, handle()} | {:error, Insider.Protocol.Error.t()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
