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