package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Apr 22, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Bus is an event bus that dispatches events to registered handlers
GetGlobalBus returns the global event bus instance
NewBus creates a new event bus
Publish publishes an event to all registered handlers
Subscribe registers a handler for a specific event type and returns a cancel
function that removes the handler when called.
type Event struct {
Type string `json:"type"`
Payload map[string]any `json:"payload"`
}
Event represents a serverless event
Handler is a function that handles an event
Source Files
¶
Click to show internal directories.
Click to hide internal directories.