View Source Pluggable.PipelineBuilder (pluggable v1.1.0)

Build pluggable steps as pipelines of other steps. Use this only if you need to define and run multiple distinct pipelines in the same module.

Examples

defmodule MyPipeline do
  pipeline :foo do
    plug SomePluggableStep
    plug :inline_step
  end

  pipeline :bar do
    plug AnotherPluggableStep
    plug :inline_step
  end
end

These pipelines can be run from within the same module:

Pluggable.run(token, [&foo(&1, [])])
Pluggable.run(another_token, [&bar(&1, [])])

Or they can be run from outside

Pluggable.run(token, [&MyPipeline.foo(&1, [])])
Pluggable.run(another_token, [&MyPipeline.bar(&1, [])])

Summary

Functions

Defines a pluggable step as a pipeline of other steps.

Defines a step inside a pipeline.

Functions

Link to this macro

pipeline(step, list)

View Source (macro)

Defines a pluggable step as a pipeline of other steps.

See module doc for more information.

Link to this macro

step(step, opts \\ [])

View Source (macro)

Defines a step inside a pipeline.

See module doc for more information.