Oi.Executor behaviour (oi v0.1.0)

Copy Markdown

Pluggable task execution strategy for stage fan-out.

Each implementation controls how tasks within a single stage are dispatched and collected. The Dispatcher calls run/3 once per stage.

Built-in implementations

Summary

Types

result()

@type result() :: {:ok, map()} | {:error, term()}

task()

@type task() :: Oi.Compiler.RecipeBundle.t()

worker()

@type worker() :: (task() -> result())

Callbacks

run(tasks, worker, opts)

@callback run(tasks :: [task()], worker :: worker(), opts :: keyword()) :: [result()]