sse

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stream

func Stream(handler handlerFunc) func(writer http.ResponseWriter, request *http.Request, methodType int) error

Types

type Event

type Event struct {
	Name    events.Name
	EventID int64  `json:"event_id"`
	Data    []byte `json:"data"`
}

type Handler

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

Handler handles http methods for sse.

func NewHandler

func NewHandler(txSource sources.TransactionSource, memPool sources.MemPoolSource) *Handler

func (*Handler) SubscribeToMessages

func (h *Handler) SubscribeToMessages(session *session, request *http.Request) error

func (*Handler) SubscribeToTransactions

func (h *Handler) SubscribeToTransactions(session *session, request *http.Request) error

Jump to

Keyboard shortcuts

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