Telegex.Plug.Pipeline (Telegex.Plug v0.3.0) View Source
插件的管道。
存储已安装的插件,并根据安装顺序依次调用插件。
Link to this section Summary
Functions
调用管道中的所有插件。
Returns a specification to start this module under a supervisor.
Install a plug into the pipeline.
Install multiple plugs into the pipeline.
Uninstall a plug in the pipeline.
Link to this section Types
Link to this section Functions
Specs
call(Telegex.Model.Update.t(), Telegex.Plug.state()) :: [snapshot()]
调用管道中的所有插件。
此方法将按照插件的安装顺序依次调用。有状态插件产生的状态将向后传递,无状态插件不产生状态变化,但会接收变化后的状态值。
注意:除了 :preheater 和 :custom 预设类型的插件,其它的任一有状态插件若进入处理流程(返回非 :ignored 的值),后续所有的无状态插件将不再实际调用。
返回所有插件的调用结果快照。
Returns a specification to start this module under a supervisor.
See Supervisor.
Specs
install(plug(), install_opts()) :: :ok | :already_installed | :unknown_preset
Install a plug into the pipeline.
Arguments
plug: The name of the module that implements the plug.optionscan_repeat: Whether to allow repeated installation. The default value isfalse, and repeated installation is not allowed.
Notes: If the value of the optional parameter can_repeat is false but an existing plug is installed, it will return :already_installed.
Install multiple plugs into the pipeline.
Arguments
plugs: List ofplug().options: Refer to theoptionsparameter in theTelegex.Pipeline.install/2function.
Uninstall a plug in the pipeline.