Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSEHandler ¶
type SSEHandler struct {
// contains filtered or unexported fields
}
func (*SSEHandler) HandleEvents ¶
func (b *SSEHandler) HandleEvents()
Start handling new and disconnected clients, as well as sending messages to all connected clients.
func (*SSEHandler) SendJSON ¶
func (b *SSEHandler) SendJSON(obj interface{})
Send out a JSON string object to all clients.
func (*SSEHandler) SendString ¶
func (b *SSEHandler) SendString(msg string)
Send out a simple string to all clients.
func (*SSEHandler) Subscribe ¶
func (b *SSEHandler) Subscribe(c *gin.Context)
Subscribe a new client and start sending out messages to it.
Click to show internal directories.
Click to hide internal directories.