Releases: pabloos/flow
Release list
x/prometheus v0.1.0
First release of the Prometheus exporter for flow (separate module).
flowprom.NewMeter(reg) implements flow.Meter on prometheus/client_golang:
pass it via flow.WithMeter and your pipeline's metrics register with your
Prometheus registry — flow_*_total counters and a
flow_process_latency_seconds histogram.
Its own module, so the flow core stays zero-dependency. Requires flow ≥ v0.5.0.
go get github.com/pabloos/flow/x/[email protected]
v0.5.0
Minor release — observability phase 3a. Backward-compatible, still zero-dependency.
New
Meterstreaming-metrics hook (instrument-based, à la OpenTelemetry) plus
WithMeter. The engine recordsproduced/processed/emitted/
consumedcounters and aprocess_latencyhistogram on the hot path.- Streaming (vs
Observe's end-of-run snapshot) so it fits long-lived pipelines;
both can be set in the same run. Opt-in — with noMeterthe hot path pays
nothing.
Boundary
Meter is stdlib-only, keeping the core zero-dependency. Concrete exporters
(Prometheus, OpenTelemetry) will land as separate submodules under flow/x/….
Notes
- The observability API (
Observe,Report,Meter) stays experimental
while v0.x.
v0.4.0
Minor release — observability phase 2. Backward-compatible with v0.3.x.
New
Report.ProcessLatency— p50/p95/p99 of per-itemProcesslatency (from a
bounded per-worker reservoir) plus exactMax. Surfaces the tail a mean hides.Report.PerWorker— busy/idle/blocked/count per worker, to spot imbalance
(useful withRunPartitionedand skewed keys).Report.String()now renderslatencyandbalancelines.
Internal
- The probe is now per-worker (no shared atomics): no contention, and the
per-worker breakdown comes for free.
Notes
- The observability API (
Observe/Report) stays experimental and may change
while v0.x.
v0.3.2
Patch release — bug fix.
Fixed
- A run started with an already-cancelled context now consumes zero values.
Previously the producer'sselectcould pick the send overctx.Done()when
a worker was parked, leaking one value past cancellation — a latent race behind
a flaky test, surfaced under-race. (#2)
v0.3.1
Patch release — bug fix.
Fixed
Runnow returns the caller's context error (e.g.context.Canceled/
context.DeadlineExceeded) when the caller cancels the context, instead of
nil. Previously a cancelled run consumed some or none of the input and
returnednil, so a truncated run was indistinguishable from a completed one.
A genuine pipeline error still takes precedence. (#1)
v0.3.0
Backward-compatible with v0.2.0.
New — built-in bottleneck detection
Observe(&Report)— an option (works withRunandRunPartitioned) that fills aReportafter the run: counts, per-stage timings, throughput and a diagnosed bottleneck.- flow triangulates by where the workers spend their time — idle (producer slow), busy (the work), blocked (consumer slow) — so
Report.BottleneckisStageProducer/StageProcessor/StageConsumer, with matching advice.Report.String()renders a readable report. - Opt-in and cheap: instrumentation runs through a nil-able probe, so with
Observeoff the hot path makes notime.Nowcalls. Zero dependencies.
Notes
The observability API (Observe, Report) is experimental and may change while v0.x. Metrics exporters that carry dependencies (Prometheus, OpenTelemetry) will land later as separate submodules to keep the core zero-dependency.
v0.2.0
Backward-compatible with v0.1.0.
New
RunPartitioned— route inputs to workers by key: same key → same worker, processed in order and never concurrently. For per-key ordering or per-key stateful processors. Combine withOrdered()for global order on top.Prefetch(n)— in-flight window so the producer can run ahead of the pool.
Docs
- Runnable
Exampletests (run in CI, shown on pkg.go.dev) and a completepackage mainprogram in the README.
v0.1.0
First release of flow: interface-driven concurrent pipelines for Go.
You implement the ends — Producer, Processor, Consumer (or pass closures via the *Func adapters) — and Run owns the concurrency, ordering, back-pressure and fail-fast cancellation.
API
RunwithWorkers(n)andOrdered()- Processors:
Map/TryMap,Filter/TryFilter,FlatMap/TryFlatMap, andThento compose - Producers:
Slice,FromSeq - Consumers:
Into,Each
Highlights
- One
Processorcovers map/filter/flatmap viaemit - Global input-order reconstruction across a worker pool (
Ordered()) - Zero dependencies, Go 1.23+
Notes
Pre-1.0: the API may still change before v1.0.0. The project's earlier iterations are preserved under the channel-api (generics channel API) and v1-legacy (pre-generics) tags.