← ClaudeAtlas

golang-samber-rolisted

Build, compose, or debug typed reactive streams with `github.com/samber/ro`, including observables, operators, subjects, sharing, plugins, cancellation, and teardown. Use when a project already uses ro or deliberately selects it for asynchronous or event-driven pipelines.
reagin/agent-skills · ★ 0 · Code & Development · score 63
Install: claude install-skill reagin/agent-skills
# samber/ro reactive streams Inspect `go.mod`, imported plugins, source construction, `PipeN` chains, subscriptions, subjects, sharing, buffers, retries, and shutdown. Verify every operator against the pinned release because the core and plugin surfaces evolve separately. ## Define the stream contract Before changing a pipeline, establish: - whether each subscription creates a fresh execution or shares one source; - ordering and callback-concurrency guarantees; - who owns source goroutines, channels, timers, and external handles; - completion, terminal error, cancellation, and retry behavior; - the slow-consumer policy and maximum buffered state; - what late subscribers receive. Use a finite loop or task group when it expresses the contract more directly. ro is most useful when values arrive over time and composition, sharing, timing, or terminal-event handling is central. ## Choose sources and pipeline APIs Representative source constructors include `Just`, `FromSlice`, `FromChannel`, `Range`, `Interval`, `Timer`, `Defer`, `Future`, and `NewObservable`. Check callback signatures, context propagation, and whether a source is finite. Prefer typed `Pipe2`, `Pipe3`, and other available `PipeN` functions when stages change element types. The untyped `Pipe` surface, where present, trades compile-time checking for dynamic composition. `Collect` and terminal operators wait for completion, so they are unsuitable for an unbounded source unless the pipeline first terminates it.