Forge.Pipeline (Forge v0.1.1)
View SourceDSL for defining sample processing pipelines.
Pipelines define how samples flow from a source through stages to storage, with measurements computed along the way.
Usage
defmodule MyApp.Pipelines do
use Forge.Pipeline
pipeline :data_processing do
source Forge.Source.Static, data: [%{value: 1}, %{value: 2}]
stage MyApp.Stages.Normalize
stage MyApp.Stages.Validate, strict: true
measurement MyApp.Measurements.Mean
measurement MyApp.Measurements.StdDev
storage Forge.Storage.ETS, table: :samples
end
endPipeline Configuration
Each pipeline must have:
- A unique name (atom)
- A source configuration
Optional:
- Stages (can have zero or more)
- Measurements (can have zero or more)
- Storage backend (if not specified, samples are not persisted)
Retrieving Configuration
config = MyApp.Pipelines.__pipeline__(:data_processing)
all_pipelines = MyApp.Pipelines.__pipelines__()