Discover Packages
github.com/wplbyx/modular
packages
eventbus
package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Jul 28, 2026
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package eventbus provides an in-process, ordered, at-most-once event bus.
Bus is a core.Resource. Setup starts one consumer and Close drains it.
New creates an EventBus without starting its consumer.
Close rejects new events and drains all events accepted before the close.
Name returns the Resource label.
Publish enqueues one event without blocking when the queue is full.
Setup starts the single consumer.
Stats returns observable queue and handler counters.
Subscribe registers a handler before Setup. Handlers run in registration order.
Config configures one process-local bus.
Event is the immutable envelope visible to handlers. Payload ownership
remains with the publisher and must not be mutated after Publish returns.
Handler consumes one local event.
Stats is a point-in-time bus snapshot.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.