handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastRequest

type BroadcastRequest struct {
	Topic string                 `json:"topic"`
	Type  string                 `json:"type"`
	Data  map[string]interface{} `json:"data"`
}

BroadcastRequest represents the request payload for broadcasting events.

type SSEHandler

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

SSEHandler handles Server-Sent Events connections.

func NewSSEHandler

func NewSSEHandler(broker *events.Broker, log *logger.Logger) *SSEHandler

NewSSEHandler creates a new SSE handler.

func (*SSEHandler) HandleBroadcast

func (h *SSEHandler) HandleBroadcast(w http.ResponseWriter, r *http.Request)

HandleBroadcast handles broadcast requests from services.

func (*SSEHandler) HandleEvents

func (h *SSEHandler) HandleEvents(w http.ResponseWriter, r *http.Request)

HandleEvents handles SSE connections from clients.

func (*SSEHandler) HandleStats

func (h *SSEHandler) HandleStats(w http.ResponseWriter, r *http.Request)

HandleStats returns SSE statistics.

Jump to

Keyboard shortcuts

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