sse

package
v0.0.0-...-db47865 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthorizationStatus

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

type SSEAuthRequestMessage

type SSEAuthRequestMessage struct {
	UserId   uuid.UUID
	SourceIP string
	Message  SSEMessage
}

type SSEBroker

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

type SSEController

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

func New

func New(db *gorm.DB, config *models.Config, bus *EventBus.Bus) *SSEController

New creates an instance of the controller and sets its DB handle

func (*SSEController) HandleEvents

func (s *SSEController) HandleEvents(w http.ResponseWriter, r *http.Request)

func (*SSEController) Start

func (s *SSEController) Start()

Start ensures each client receives a periodic ping to maintain the connection This signals the app that the connection shouldn't be closes Also aims at signalling potential corporate proxies that they should not close the connection.

type SSEMessage

type SSEMessage struct {
	Action string
	Nonce  string
	Issuer string
}

Jump to

Keyboard shortcuts

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