go-sse: github.com/zackshen/go-sse Index | Files | Directories

package sse

import "github.com/zackshen/go-sse"

Index

Package Files

sse.go

type Connection Uses

type Connection chan string

type Messages Uses

type Messages chan string

type SSE Uses

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

func NewSSE Uses

func NewSSE() *SSE

func (*SSE) AddMessage Uses

func (s *SSE) AddMessage(event string, text string)

func (*SSE) Data Uses

func (s *SSE) Data() []string

func (*SSE) Flush Uses

func (s *SSE) Flush()

func (*SSE) SetEventId Uses

func (s *SSE) SetEventId(eventId string)

func (*SSE) SetRetry Uses

func (s *SSE) SetRetry(retry int)

func (*SSE) String Uses

func (s *SSE) String() string

type SSEHandler Uses

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

func NewSSEHandler Uses

func NewSSEHandler() *SSEHandler

func (*SSEHandler) AddConnection Uses

func (s *SSEHandler) AddConnection(conn Connection)

func (*SSEHandler) Broadcast Uses

func (s *SSEHandler) Broadcast(msg string)

func (*SSEHandler) HttpHandler Uses

func (s *SSEHandler) HttpHandler(response http.ResponseWriter, request *http.Request)

func (*SSEHandler) Listen Uses

func (s *SSEHandler) Listen()

func (*SSEHandler) RemoveConnection Uses

func (s *SSEHandler) RemoveConnection(conn Connection)

Directories

PathSynopsis
demo

Package sse imports 4 packages (graph) and is imported by 1 packages. Updated 2018-09-01. Refresh now. Tools for package owners.