new Pipeline(name) → {Pipeline}
constructor
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the Pipeline |
Methods
-
static build(desc) → {PipelineStage}
-
Builds a pipeline based on a description of the pipeline. The pipeline is an Array of pipeline stage objects.
Parameters:
Name Type Description desc
Array.<(string|Object)> The description of the pipeline. See the test file
pipeline.js
for examples -
static create(name, desc) → {Pipeline}
-
Creates a new pipleine named
name
built to the descriptiondesc
Parameters:
Name Type Description name
string The name of the pipeline, for future reference
desc
Array.<(string|Object)> The pipeline description passed to
build
-
static get(name) → {Pipeline}
-
Retrieves a pipeline with the matching name
Parameters:
Name Type Description name
string Name of the pipeline to return
-
build(desc)
-
Builds the pipeline from a description and assigns it to the first stage of this pipeline. Pipeline building is done using the static
build
method.Parameters:
Name Type Description desc
Array.<string> An array of pipeline stage names or objects describing each stage.
-
async run(input) → {Promise.<any>}
-
Execute the pipeline
Parameters:
Name Type Description input
any Input data value for the first stage of the pipeline
Returns:
Promise.<any> -A Promise that resolves to the value of the pipeline, or rejects on error