Go-bus: A Lightweight In-Process Event Bus Library for Go Developers
Go-bus is a minimal, in-process event bus library built for use within a single Go binary. It supports typed events with arbitrary payloads and features a zero-allocation publish path for known events, improving performance on hot paths. Listeners can be configured as one-shot handlers that auto-remove after their first trigger, or managed via context-based cancellation for clean shutdowns. The library is panic-safe, recovering and logging errors from misbehaving listeners without halting subsequent message delivery. Built as a thin wrapper over the go-pubsub engine, go-bus avoids hidden runtimes or unmanaged goroutines.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in