January 2020
Intermediate to advanced
640 pages
16h 56m
English
After thoroughly describing the ins and outs of each individual pipeline component, it is finally time to bring everything together and implement an API that the end users of the pipeline package will depend on for assembling and executing their pipelines.
A new pipeline instance can be created by invoking the variadic New function from the pipeline package. As you can see in the following code listing, the construction function expects a list of StageRunner instances as arguments where each element of the list corresponds to a stage of the pipeline:
type Pipeline struct { stages []StageRunner } // New returns a new pipeline instance where input payloads will traverse // each one of the specified ...