Orchid.Runner.Hook behaviour (Orchid v0.6.1)

Copy Markdown View Source

Behaviour for runner hooks.

Summary

Callbacks

Callback to execute the hook.

Types

hook_result()

@type hook_result() :: orchid_core_result() | special_result()

next_fn()

@type next_fn() :: (Orchid.Runner.Context.t() -> hook_result())

orchid_core_result()

@type orchid_core_result() :: {:ok, Orchid.Step.output()} | {:error, term()}

special_result()

@type special_result() :: {:special, any()}

Callbacks

call(ctx, next_fn)

@callback call(ctx :: Orchid.Runner.Context.t(), next_fn()) :: hook_result()

Callback to execute the hook.