Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventManager ¶
type EventManager interface {
// Subscribe returns a channel that receives events for the specified page
Subscribe(ctx context.Context, pageID string) (<-chan UIEvent, error)
// Publish sends an event for the specified page
Publish(pageID string, event UIEvent) error
// Close cleans up resources used by the event manager
Close() error
}
EventManager defines the interface for managing UI events
type UIEvent ¶
type UIEvent struct {
Type string `json:"type"` // e.g. "component-update", "page-reload"
PageID string `json:"pageId"` // Which page is being updated
Component interface{} `json:"component"` // The updated component data
RequestID string `json:"requestId,omitempty"` // Optional request ID for tracking user actions
}
UIEvent represents an event in the UI system that can trigger updates
func NewPageReloadEvent ¶
NewPageReloadEvent creates a new event for reloading a page
type WatermillEventManager ¶
type WatermillEventManager struct {
// contains filtered or unexported fields
}
WatermillEventManager implements EventManager using Watermill
func NewWatermillEventManager ¶
func NewWatermillEventManager(logger *zerolog.Logger) (*WatermillEventManager, error)
NewWatermillEventManager creates a new WatermillEventManager
func (*WatermillEventManager) Close ¶
func (m *WatermillEventManager) Close() error
Close implements EventManager.Close
Click to show internal directories.
Click to hide internal directories.