server

package
v0.3.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountAPIForCodegen added in v0.2.0

func MountAPIForCodegen(mux *http.ServeMux) huma.API

MountAPIForCodegen is the exported entry the openapi dump tool uses to introspect the spec without instantiating Deps + auth. Mirrors weft-webui's pattern.

Types

type Options

type Options struct {
	// Logger is the slog logger. Required.
	Logger *slog.Logger
	// Static is the SPA bundle FS (typically the embedded dist/).
	Static fs.FS
	// Projects backs project file IO.
	Projects project.Store
	// Compiler orchestrates microVM compile jobs.
	Compiler *compile.Service
	// Auth validates OIDC bearers. nil = dev mode (auth disabled,
	// every request gets a synthetic identity).
	Auth auth.Verifier
}

Options bundles everything the server needs to boot.

type Server

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

Server is the HTTP handler tree, built once at startup.

func New

func New(opts Options) (*Server, error)

New wires the routes ; returns an http.Handler ready to mount on a net/http listener.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler. Delegates to the inner mux ; the auth middleware lives inside the route registrations so we can keep healthz unauthenticated.

Jump to

Keyboard shortcuts

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