SSE

package
v0.0.0-...-1c97a39 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Servers map[string]Server
}

func NewManager

func NewManager(addrWithoutPort string, settings []SSEServerSettings) (manager Manager)

func (*Manager) SendMsg

func (manager *Manager) SendMsg(request *Request, response *int) error

type Request

type Request struct {
	AppName string
	Msg     string
}

type SSEServerSettings

type SSEServerSettings struct {
	AppName string
	Port    int
}

type Server

type Server struct {
	Notifier chan []byte
	// contains filtered or unexported fields
}

func NewServer

func NewServer() (server *Server)

func (*Server) Listen

func (server *Server) Listen(addr string)

func (*Server) Send

func (server *Server) Send(msg string)

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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