Function returns a pipeline `Stage` that will run a `StageFunc` in a separate goroutine to process the data. See `StageFunc` for more information.
(name string, f StageFunc)
| 22 | // a separate goroutine to process the data. See `StageFunc` for more |
| 23 | // information. |
| 24 | func Function(name string, f StageFunc) Stage { |
| 25 | return &goStage{ |
| 26 | name: name, |
| 27 | f: f, |
| 28 | done: make(chan struct{}), |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // goStage is a `Stage` that does its work by running an arbitrary |
| 33 | // `stageFunc` in a goroutine. |
no outgoing calls