View Source Reactor.Executor.Hooks (reactor v0.10.3)
Handles the execution of reactor middleware hooks.
Summary
Functions
Run the completion hooks allowing the result to be replaced
Run the error hooks allowing the error to be replaced
Emit a step event.
Run any get_process_context hooks
Run the halt hooks collecting the new context as it goes
Run the init hooks collecting the new context as it goes
Run set_process_context hooks given the result of get_process_contexts/1
Functions
@spec complete(Reactor.t(), any(), Reactor.context()) :: {:ok, any()} | {:error, any()}
Run the completion hooks allowing the result to be replaced
@spec error(Reactor.t(), any(), Reactor.context()) :: {:error, any()}
Run the error hooks allowing the error to be replaced
@spec event( Reactor.t(), Reactor.Middleware.step_event(), Reactor.Step.t(), Reactor.context() ) :: :ok
Emit a step event.
@spec get_process_contexts(Reactor.t()) :: %{ optional(Reactor.Middleware.t()) => any() }
Run any get_process_context hooks
@spec halt(Reactor.t(), Reactor.context()) :: {:ok, Reactor.context()} | {:error, any()}
Run the halt hooks collecting the new context as it goes
@spec init(Reactor.t(), Reactor.context()) :: {:ok, Reactor.context()} | {:error, any()}
Run the init hooks collecting the new context as it goes
@spec set_process_contexts(%{optional(Reactor.Middleware.t()) => any()}) :: :ok
Run set_process_context hooks given the result of get_process_contexts/1