Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientChan ¶
type ClientChan chan string
type Event ¶
type Event 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.
func NewStreamServer ¶
func NewStreamServer() (event *Event)
func (*Event) ServeHTTP ¶
func (stream *Event) ServeHTTP() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.