Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func (*Bus) Dropped ¶ added in v0.21.0
Dropped returns the cumulative number of events dropped to full subscriber buffers, for observability.
func (*Bus) SubscribeAll ¶
func (*Bus) Unsubscribe ¶
type Event ¶
type Event struct {
Type string `json:"type"`
// Seq is a monotonic, bus-global sequence number stamped on every published
// event. Delivery to a slow subscriber is still lossy by design (a full
// buffer drops rather than blocking the hot path), but the seq makes drops
// DETECTABLE: a client that sees the sequence jump knows it missed events and
// can resync. Control frames sent directly by the SSE handler
// (server.connected/config/heartbeat) do not go through Publish and carry no
// seq (0), so clients must ignore seq 0 for gap detection.
Seq int64 `json:"seq"`
Properties json.RawMessage `json:"properties"`
}
Click to show internal directories.
Click to hide internal directories.