sse

package
v0.0.0-...-bafe0c7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sse implements Server-Sent Events functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(messages chan string, logger cli.Logger, clients map[*Client]bool, clientsMu *sync.Mutex) http.HandlerFunc

Handle manages SSE connections, setting up appropriate headers and maintaining the connection until the client disconnects.

func StartDispatcher

func StartDispatcher(messages chan string, clients map[*Client]bool, clientsMu *sync.Mutex, symmetricKey []byte)

StartDispatcher initializes the SSE message dispatcher that broadcasts messages to all connected clients.

Types

type Client

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

Client represents a connected SSE client with its associated writer and flusher for sending events.

Jump to

Keyboard shortcuts

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