webserver

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package webserver provides an HTTP server that serves the embedded SPA dashboard and exposes REST API endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port          int
	ResultsDir    string
	NoBrowser     bool
	Logger        *slog.Logger
	StorageConfig *projectconfig.StorageConfig // Optional storage config
}

Config holds the HTTP server configuration.

type Server

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

Server wraps the HTTP server with configuration.

func New

func New(cfg Config) (*Server, error)

New creates a new HTTP server with the given configuration.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the underlying http.Handler (useful for testing).

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

ListenAndServe starts the HTTP server and optionally opens a browser.

Jump to

Keyboard shortcuts

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