eventlistener

package
v0.152.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service is the shared implementation of domain.ChatEventListener used by every handler/service that needs to keep pumping a Bubble Tea channel.

func NewService

func NewService() *Service

NewService returns a new event listener service.

func (*Service) ListenForChatEvents

func (s *Service) ListenForChatEvents(eventChan <-chan domain.ChatEvent) tea.Cmd

ListenForChatEvents returns a tea.Cmd that reads one event off the chat event channel and surfaces it as the next tea.Msg. A closed channel terminates the listener (returns nil).

func (*Service) ListenForEvents

func (s *Service) ListenForEvents(eventChan <-chan tea.Msg) tea.Cmd

ListenForEvents is the tea.Msg variant of ListenForChatEvents, used for non-chat channels (bash output, tool progress).

Jump to

Keyboard shortcuts

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