realtime

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

Hub manages SSE connections and fans out events from Redis pub/sub.

func NewHub

func NewHub(rdb *redis.Client) *Hub

func (*Hub) Publish

func (h *Hub) Publish(ctx context.Context, ev models.StreamEvent) error

Publish sends an event to all clients in the hiveshare via Redis.

func (*Hub) ServeSSE

func (h *Hub) ServeSSE(w http.ResponseWriter, r *http.Request, hiveshareID uuid.UUID)

ServeSSE handles an SSE connection for a specific hiveshare.

Jump to

Keyboard shortcuts

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