# `Orchid.Executor`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L1)

Executor behavoir.

An executor receive a `Orchid.Scheduler.Context` struct and do execution.

There're some functions recommend to use during execution.

* `Orchid.Scheduler.next_ready_steps/1`
* `Orchid.Scheduler.merge_result/3`
* `Orchid.Scheduler.mark_running_steps/3`
* `Orchid.Scheduler.done?/1`
* `Orchid.Runner.run/4`

# `executor`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L16)

```elixir
@type executor() :: module()
```

# `executor_opts`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L17)

```elixir
@type executor_opts() :: keyword()
```

# `response`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L19)

```elixir
@type response() ::
  {:ok, Orchid.Scheduler.Context.param_map()} | {:error, Orchid.Error.t()}
```

# `execute`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L21)

```elixir
@callback execute(Orchid.Scheduler.Context.t(), executor_opts()) :: response()
```

# `execute_next_step`
[🔗](https://github.com/SynapticStrings/Orchid/blob/main/lib/orchid/executor.ex#L34)

```elixir
@spec execute_next_step(Orchid.Scheduler.Context.t()) ::
  {:done, Orchid.Scheduler.Context.t()}
  | {:stuck, Orchid.Scheduler.Context.t()}
  | {:cont, Orchid.Scheduler.Context.t()}
  | {:error, Orchid.Error.t()}
```

Executes the next ready step in the given context.

Debugging helper function for executors.

---

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