web

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a single WebSocket connection.

type Hub

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

Hub manages WebSocket client connections and broadcasts messages.

func NewHub

func NewHub() *Hub

NewHub creates a new WebSocket hub.

func (*Hub) Broadcast

func (h *Hub) Broadcast(msg []byte)

Broadcast sends a message to all connected clients.

func (*Hub) Register

func (h *Hub) Register(c *Client)

Register adds a client to the hub.

func (*Hub) Run

func (h *Hub) Run(ctx context.Context)

Run starts the hub, cleaning up closed connections.

func (*Hub) Unregister

func (h *Hub) Unregister(c *Client)

Unregister removes a client from the hub.

type Server

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

Server is the HTTP server for the Dstl8 Lite web dashboard.

func NewServer

func NewServer(eng *engine.Engine, staticFS fs.FS, version string, relFetcher *releases.Fetcher) *Server

NewServer creates a new web dashboard server.

func (*Server) Start

func (s *Server) Start(ctx context.Context, port int) error

Start starts the web server on the given port.

Jump to

Keyboard shortcuts

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