package
0.0.0-20240310050254-b36961d4e99b
Repository: https://github.com/seejson/node.git
Documentation: pkg.go.dev
# README
pipeline
This package provides a simplistic implementation of Go pipelines as outlined in Go Concurrency Patterns: Pipelines and cancellation.
Docs
GoDoc available here.
Example Usage
import "github.com/SeeJson/node/core/pipeline"
p := pipeline.New()
p.AddStageWithFanOut(myStage, 10)
p.AddStageWithFanOut(anotherStage, 100)
doneChan := p.Run(inChan)
<- doneChan
More comprehensive examples can be found here.
# Packages
No description provided by the author
# Functions
No description provided by the author
MergeChannels merges an array of channels into a single channel.
New is a convenience method that creates a new Pipeline.
# Type aliases
Pipeline type defines a pipeline to which processing "stages" can be added and configured to fan-out.
ProcessFn are the primary function types defined by users of this package and passed in to instantiate a meaningful pipeline.
StageFn is a lower level function type that chains together multiple stages using channels.