stream

package
v1.5.42 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 1 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 EventStream

type EventStream 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
}

It keeps a list of clients those are currently attached and broadcasting events to those clients.

Jump to

Keyboard shortcuts

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