What problem does it solve?
Go developers often face the complexity of building robust asynchronous pipelines with manual goroutines and channels. samber/ro provides a declarative, type-safe reactive framework to model streams as Observables and compose operators with backpressure, error propagation, and lifecycle management.
Core Features & Use Cases
- Typed pipelines with 150+ operators (Map, Filter, FlatMap, Retry, CombineLatest, etc.) and compile-time safety via Pipe2/ Pipe3.
- Support for cold/hot observables and five Subject types (Publish, Behavior, Replay, Async, Unicast) for flexible sharing strategies.
- Comprehensive error handling, context propagation, and backoff strategies (Catch, RetryWithConfig, OnErrorReturn) for resilient production-grade pipelines.
- Real-world scenarios include data ingestion from channels/APIs, WebSocket-like streams, and event-driven microservices.
Quick Start
Create a simple pipeline that reads from a source observable, applies a couple of operators, and subscribes to process results.