app

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App web app

func NewApp

func NewApp(cfg *config.Config, metaStorer db.MetadataStorer, docStorer storage.DocumentStorer) App

NewApp constructs an app

func (*App) Start

func (app *App) Start()

Start starts the app

func (*App) Stop

func (app *App) Stop()

type Hub

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

Hub ws notificaiton hub

func NewHub

func NewHub() *Hub

NewHub construct a hub

func (*Hub) ClientCount

func (h *Hub) ClientCount() int

ClientCount number of connected clients

func (*Hub) ConnectWs

func (h *Hub) ConnectWs(w http.ResponseWriter, r *http.Request)

ConnectWs upgrade the connection to websocket

func (*Hub) Send

func (h *Hub) Send(msg messages.WsMessage)

Send sends a message to all connected clients

Jump to

Keyboard shortcuts

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