wsinject

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoHeaderTagFound = errors.New("no header tag found")

Functions

This section is empty.

Types

type Fileserver

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

func NewFileServer

func NewFileServer(wsPort int, wsPath string, forceReload, expectTLS bool) *Fileserver

func (*Fileserver) Setup

func (fs *Fileserver) Setup(pathToMaster string) (string, error)

func (*Fileserver) Start

func (fs *Fileserver) Start(ctx context.Context) error

Start listening to file events, update mirror and stream notifications on which files to update

func (*Fileserver) WsHandler

func (fs *Fileserver) WsHandler(ws *websocket.Conn)

WsHandler sends page reload notifications to the connected websocket

Jump to

Keyboard shortcuts

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