ssebroker

package
v0.0.0-...-db9a40e Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadersMiddleware

func HeadersMiddleware() gin.HandlerFunc

Types

type ClientChan

type ClientChan chan string

New event messages are broadcast to all registered client connection channels

type SSEBroker

type SSEBroker struct {

	// Events are pushed to this channel by the main
	// events-gathering routine
	Message chan string

	// New client connections
	NewClients chan chan string

	// Closed client connections
	ClosedClients chan chan string

	// Total client connections
	TotalClients map[chan string]bool
}

func NewSSEBroker

func NewSSEBroker() (ssebroker *SSEBroker)

func (*SSEBroker) Listen

func (broker *SSEBroker) Listen()

Listen for new sse event requests Process events clients

func (*SSEBroker) ServeHTTP

func (broker *SSEBroker) ServeHTTP() gin.HandlerFunc

Jump to

Keyboard shortcuts

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