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.
Click to show internal directories.
Click to hide internal directories.