Originally published byDev.to
A minimal, in-process event bus for Go โ typed events, cancelable listeners,
and one-shot handlers, built on top of the zero-allocation
go-pubsub engine.
๐ go-bus is in-process and fire-and-forget. It is the right tool for
decoupling components inside a single Go binary. If you need to cross a
process or network boundary, reach for NATS, Kafka, or RabbitMQ instead.
Why go-bus?
| ๐ฏ Typed events | Dispatch arbitrary any payloads keyed by a typed Event. |
| โก Zero-alloc emits | The publish hot path allocates nothing for a known event โ see Performance. |
| ๐ One-shot handlers | Listeners can auto-remove after their first trigger. |
| ๐๏ธ Context-based cancel | Every listener owns a context.Context; cancel stops it cleanly. |
| ๐ก๏ธ Panic-safe | A panicking listener is recovered and logged; it keeps running on later messages. |
| ๐ Thin layer | A focused wrapper over go-pubsub โ no hidden runtime, no goroutine zoo to manage. |
๐บ๐ธ
More news from United StatesUnited States
NORTH AMERICA
Related News
Secret Claude Tracker Shocks Users After Anthropic's Anti-Surveillance Stance
12h ago
EV Batteries Defy Expectations, Last Hundreds of Thousands of Miles
1d ago
GBase 8a Performance Anomaly Case Study: How a Single Parameter Change Sparked a Chain Reaction
1d ago
Who Else Has Inherited a Codebase With Zero Comments and a Prayer?
1d ago
ๅฎ็พ็ๅนณๅบธ
4h ago