Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WireSet = wire.NewSet( ProvideEventsStreaming, )
WireSet provides a wire set for this package.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type enum.SSEType `json:"type"` Data json.RawMessage `json:"data"` }
Event is a server sent event.
type Streamer ¶
type Streamer interface { // Publish publishes an event to a given space ID. Publish(ctx context.Context, spaceID int64, eventType enum.SSEType, data any) error // Stream streams the events on a space ID. Stream(ctx context.Context, spaceID int64) (<-chan *Event, <-chan error, func(context.Context) error) }
func ProvideEventsStreaming ¶
Click to show internal directories.
Click to hide internal directories.