golang-samber-ro

Build reactive event-driven pipelines in Go with samber/ro operators.

2|Updated Mar 13, 2023
One-click install
npx skills add https://github.com/haipham22/golang-sample --skill golang-samber-ro-haipham22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-ro
Source: https://github.com/haipham22/golang-sample/tree/main/.agents/skills/golang-samber-ro
Command: npx skills add https://github.com/haipham22/golang-sample --skill golang-samber-ro-haipham22

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and implement reactive, event-driven pipelines in Go with samber/ro, replacing fragile manual goroutine and channel wiring with composable stream operators.

Core Features & Use Cases

  • Stream Construction and Transformation: Create observables from slices, channels, timers, and async sources, then map, filter, scan, flatten, and batch them cleanly.
  • Error Handling and Recovery: Apply retries, fallbacks, context cancellation, and completion handling to keep long-running pipelines resilient.
  • Hot Observables and Subjects: Choose between PublishSubject, BehaviorSubject, ReplaySubject, AsyncSubject, UnicastSubject, Share, ShareReplay, and Connectable to match multicast and replay needs.
  • Practical Use Cases: Build WebSocket fan-out, live dashboards, file watcher reloads, cron-driven jobs, graceful shutdown flows, and production telemetry pipelines in Go.

Quick Start

Ask the AI to build a samber/ro pipeline for your Go use case and include the source, desired operators, and shutdown or retry requirements in plain language.

Frequently Asked Questions about golang-samber-ro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build reactive streams in Go without manually managing channels and goroutines?

Reactive streams in Go can be built using composable observable operators, replacing fragile manual goroutine and channel wiring with typed pipe chains for clean stream processing.

How does error handling work in Go reactive pipelines with context cancellation?

Error handling in Go reactive pipelines applies retries, fallbacks, and context cancellation to propagate errors cleanly across asynchronous workflows and keep long-running pipelines resilient.

What's the best way to handle WebSocket fan-out and live dashboard updates in Go?

WebSocket fan-out and live dashboard updates are handled using hot observables and subjects like PublishSubject or BehaviorSubject to multicast events to multiple subscribers simultaneously.

When should I use PublishSubject versus BehaviorSubject or ReplaySubject in Go?

PublishSubject multicasts to current subscribers, BehaviorSubject replays the latest value to new subscribers, and ReplaySubject caches previous emissions for delayed subscription scenarios.

How do I implement graceful shutdown in a Go event-driven pipeline?

Graceful shutdown in a Go event-driven pipeline is implemented by applying context cancellation and completion handling operators to cleanly terminate asynchronous workflows.

Can I create observables from slices, channels, and timers for stream processing in Go?

Observables can be created from slices, channels, timers, and async sources, then transformed using map, filter, scan, flatten, and batch operators for stream processing.