sse

package
v0.0.0-...-891d2fd Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Session session.Handler

	Channels map[string]chan string
	// contains filtered or unexported fields
}

func New

func New(s session.Handler) *Handler

func (*Handler) Broadcast

func (h *Handler) Broadcast(message string)

func (*Handler) Send

func (h *Handler) Send(chanid, message string)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Message

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

func Msg

func Msg() Message

func (Message) Data

func (m Message) Data(lines ...string) Message

func (Message) End

func (m Message) End() string

func (Message) Event

func (m Message) Event(name string) Message

func (Message) Id

func (m Message) Id(id string) Message

func (Message) Retry

func (m Message) Retry(n int) Message

Jump to

Keyboard shortcuts

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