eventbus

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package eventbus provides a central message hub for application events and updates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus struct {
	// contains filtered or unexported fields
}

EventBus facilitates bi-directional communication between the UI and Workflow. It buffers updates to the UI and actions to the workflow.

func New

func New() *EventBus

New creates and starts a new EventBus.

func (*EventBus) Close

func (b *EventBus) Close()

Close signals that no more updates or actions will be sent. It blocks until all already-buffered updates have been delivered.

func (*EventBus) SendAction

func (b *EventBus) SendAction(act domain.Action)

SendAction queues an action for the workflow. It never blocks.

func (*EventBus) SendUIUpdate

func (b *EventBus) SendUIUpdate(upd domain.UIUpdate)

SendUIUpdate queues an update for the UI. It never blocks.

func (*EventBus) UIUpdates

func (b *EventBus) UIUpdates() <-chan domain.UIUpdate

UIUpdates returns the channel for receiving UI updates.

func (*EventBus) WorkflowActions

func (b *EventBus) WorkflowActions() <-chan domain.Action

WorkflowActions returns the channel for receiving workflow actions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL