Configuration.use()
Description
Appends a use filter to the current pipeline layout.
A use filter creates a sub-pipeline from a pipeline layout in a differen module and streams Events through it.
- INPUT - Any types of Events to stream into the sub-pipeline.
- OUTPUT - Events streaming out from the sub-pipeline.
- SUB-INPUT - Events streaming into the use filter.
- SUB-OUTPUT - Any types of Events.
This filter is similar to link(), only for a sub-pipeline layout defined in a different file than the current. The filename of the other module is required in the first parameter. The second parameter is the name of the sub-pipeline layout in that module. When the second parameter is absent, the entry pipeline of that module will be used.
When the provided filename has extension name ".so", it indicates a native module that should be dynamically loaded and linked to the Pipy main executable. Native modules are similar to modules written in PipyJS, only different in that they are written in other languages such as C and hooked up to Pipy via NMI (Native Module Interface).
See NMI for more details on how to create a native module.
Syntax
pipy().pipeline().use(filename, pipelineLayoutName)
Parameters
use(filename, pipelineLayoutName?)
Module file pathname in the current codebase.
Name of the sub-pipeline layout in the module being used. The entry pipeline will be used if the name is not given.
The same Configuration object.