Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PipelineBuilder module #58

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Add PipelineBuilder module #58

merged 2 commits into from
Mar 21, 2024

Conversation

mruoss
Copy link
Owner

@mruoss mruoss commented Mar 21, 2024

Moduledoc

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, [])])

Copy link

github-actions bot commented Mar 21, 2024

Pull Request Test Coverage Report for Build 558887fba866164b384b77bfe73d8c1a93684b4d-PR-58

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 84b77fd1b95c30645a1f553a5b27f0a18b1481b4: 0.0%
Covered Lines: 80
Relevant Lines: 80

💛 - Coveralls

@mruoss mruoss merged commit 9be3808 into main Mar 21, 2024
16 checks passed
@mruoss mruoss deleted the pipeline-builder branch March 21, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant