View Source Reactor.Executor.Hooks (reactor v0.5.2)

Handles the execution of reactor lifecycle hooks.

Summary

Functions

Run the completion hooks allowing the result to be replaced

Run the error hooks allowing the error to be replaced

Run the halt hooks collecting the new context as it goes

Run the init hooks collecting the new context as it goes

Functions

Link to this function

complete(reactor, result, context)

View Source
@spec complete(Reactor.t(), any(), Reactor.context()) ::
  {:ok, any()} | {:error, any()}

Run the completion hooks allowing the result to be replaced

Link to this function

error(reactor, reason, context)

View Source
@spec error(Reactor.t(), any(), Reactor.context()) :: :ok | {:error, any()}

Run the error hooks allowing the error to be replaced

@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