gin-sse: github.com/lmas/gin-sse Index | Files

package ssehandler

import "github.com/lmas/gin-sse"

Index

Package Files

sse_handler.go

type SSEHandler Uses

type SSEHandler struct {
    // contains filtered or unexported fields
}

func NewSSEHandler Uses

func NewSSEHandler() *SSEHandler

Make a new SSEHandler instance.

func (*SSEHandler) HandleEvents Uses

func (b *SSEHandler) HandleEvents()

Start handling new and disconnected clients, as well as sending messages to all connected clients.

func (*SSEHandler) SendJSON Uses

func (b *SSEHandler) SendJSON(obj interface{})

Send out a JSON string object to all clients.

func (*SSEHandler) SendString Uses

func (b *SSEHandler) SendString(msg string)

Send out a simple string to all clients.

func (*SSEHandler) Subscribe Uses

func (b *SSEHandler) Subscribe(c *gin.Context)

Subscribe a new client and start sending out messages to it.

Package ssehandler imports 5 packages (graph) and is imported by 1 packages. Updated 2016-07-18. Refresh now. Tools for package owners.