View Source Pipeline behaviour (ex_pipeline v0.1.0)

Pipeline management.

Link to this section Summary

Callbacks

Returns a list of functions to be used as callbacks of a pipeline. These callbacks will be executed in the same order that they appear on this list.

Returns a list of functions to be used as steps of a pipeline. These steps will be executed in the same order that they appear on this list.

Functions

Executes the pipeline defined by module with the given value and options.

Link to this section Types

@type args() :: any()
@type callback() :: (Pipeline.State.t(), options() -> any())
@type options() :: Keyword.t()
@type reducer() :: (args(), options() -> result())
@type result() :: {:ok, any()} | {:error, any()}

Link to this section Callbacks

Link to this callback

__pipeline_callbacks__()

View Source
@callback __pipeline_callbacks__() :: [callback()]

Returns a list of functions to be used as callbacks of a pipeline. These callbacks will be executed in the same order that they appear on this list.

@callback __pipeline_steps__() :: [reducer()]

Returns a list of functions to be used as steps of a pipeline. These steps will be executed in the same order that they appear on this list.

Link to this section Functions

Link to this function

execute(module, value, options \\ [])

View Source

Executes the pipeline defined by module with the given value and options.