Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Plug pipeline wrapper: handling options

Plug pipeline wrapper: handling options

Plug.Builder can be used to build a plug pipeline, but it requires us to hardcode the options to the wrapped plugs. In my case I wanted to allow the users of the wrapper plug, distributed as part of a hex package, to provide the options to be passed down to the wrapped plugs, meaning I cannot specify the options in advance. I talked about how to use the Plug behaviour to write a new plug that wraps up a plug pipeline without using Plug.Builder, including also passing through the options to the underlying plugs.

Adam Millerchip

October 26, 2018
Tweet

More Decks by Adam Millerchip

Other Decks in Technology

Transcript