Documentation
¶
Overview ¶
Package bus (piece ⑫) fans out domain events in memory: the web receives them over SSE, chat adapters re-edit messages already sent, and the scheduler re-plans reminders.
Index ¶
Constants ¶
View Source
const ( SubscriptionCreated = "subscription.created" SubscriptionUpdated = "subscription.updated" SubscriptionDeleted = "subscription.deleted" ChargeUpdated = "charge.updated" PaymentMethodSaved = "payment_method.saved" CategorySaved = "category.saved" HouseholdUpdated = "household.updated" // KeepAwakeUpdated: the keep-awake setting or its status changed. KeepAwakeUpdated = "keep_awake.updated" )
Event types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is a non-blocking in-memory pub/sub. A slow subscriber loses events (its channel is buffered); consumers must refetch on gaps, as SSE clients do on reconnect (ADR 0013).
type Event ¶
type Event struct {
Type string `json:"type"`
HouseholdID string `json:"householdId"`
SubscriptionID string `json:"subscriptionId,omitempty"`
ChargeID string `json:"chargeId,omitempty"`
EntityID string `json:"entityId,omitempty"`
ActorLabel string `json:"actor,omitempty"`
AuditID string `json:"auditId,omitempty"`
At time.Time `json:"at"`
}
Event describes something that changed.
Click to show internal directories.
Click to hide internal directories.