Documentation
¶
Overview ¶
Package events is a lossy in-process event bus for UI notifications. It is not a reliable delivery channel; plugin hooks read the database cursor instead.
Index ¶
Constants ¶
View Source
const ( MessageReceived = "message.received" MessagesChanged = "messages.changed" SyncStarted = "sync.started" SyncFinished = "sync.finished" SyncFailed = "sync.failed" OutboxChanged = "outbox.changed" SettingsChanged = "settings.changed" ApprovalsChanged = "approvals.changed" PluginsChanged = "plugins.changed" MCPChanged = "mcp.changed" LabelsChanged = "labels.changed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus fans events out to subscribers. Publish never blocks.
type Event ¶
type Event struct {
Type string
AccountID int64
FolderID int64
ThreadIDs []int64
MessageIDs []int64
Error string
// Kind is a sync.failed's conn.FailureKind (dns, connect, timeout, tls,
// auth, protocol), or empty when the connection was fine.
Kind string
// ConversationID is set on approvals.changed.
ConversationID int64
}
Event describes something that happened. Only IDs are carried, never IMAP UIDs.
Click to show internal directories.
Click to hide internal directories.