Telegex.Plug v0.2.0 Telegex.Plug.Pipeline View Source
Plug pipeline.
Cache plug modules in preset categories, and call plug in the pipeline in order.
Link to this section Summary
Functions
Call all plugs in the pipeline.
Get a list of plugs whose preset category is caller
.
Returns a specification to start this module under a supervisor.
Get a list of plugs whose preset category is commander
.
Get a list of plugs whose preset category is handler
.
Install a plug into the pipeline.
Install multiple plugs into the pipeline.
Get a list of plugs whose preset category is preheater
.
Uninstall a plug in the pipeline.
Link to this section Types
Specs
plug() :: atom()
Link to this section Functions
Specs
call(Telegex.Model.Update.t(), Telegex.Plug.state()) :: [snapshot()]
Call all plugs in the pipeline.
This function always keeps the calling order of commanders
=> handlers
-> caller
. The state of the previous call result will be used before the stateful Plug is called.
At the same time, this function will return all the call results of Plug, which are stored in order in a list.
Specs
callers() :: [atom()]
Get a list of plugs whose preset category is caller
.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
commanders() :: [atom()]
Get a list of plugs whose preset category is commander
.
Specs
handlers() :: [atom()]
Get a list of plugs whose preset category is handler
.
Install a plug into the pipeline.
Install multiple plugs into the pipeline.
Specs
preheaters() :: [atom()]
Get a list of plugs whose preset category is preheater
.
Uninstall a plug in the pipeline.