httpapi

package
v0.1.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: GPL-3.0 Imports: 46 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

Overview

Package httpapi exposes the local browser UI and core HTTP API routes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	Traces                 *diagnostics.TraceRing
	Transport              transport.DiagnosticsProvider
	MotionTransport        transport.Transport
	LLMProvider            llm.Provider
	LLMHTTPClient          *http.Client
	CloudBaseURL           string
	CloudHTTPClient        *http.Client
	IntifaceHTTPClient     *http.Client
	BrowserBluetoothBridge *transport.BrowserBluetoothBridge
	// ExecutablePath makes first-party worker discovery deterministic and
	// injectable in tests. Empty falls back to os.Executable.
	ExecutablePath      string
	UpdateHTTPClient    *http.Client
	UpdateReleaseAPIURL string
}

Runtime contains app runtime collaborators exposed through HTTP diagnostics.

type Server

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

Server owns the local HTTP routes and embedded static asset serving.

func New

func New(static fs.FS, logger *slog.Logger, store *config.Store, runtime Runtime, version VersionInfo) (*Server, error)

New wires the HTTP API to the embedded static assets and structured logger.

func (*Server) Close

func (s *Server) Close()

Close releases runtime and datastore resources after quiescing device work. It is idempotent so startup failures and deferred shutdown can share it.

func (*Server) Handler

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

Handler returns the HTTP handler for use by net/http servers and tests.

func (*Server) Quiesce

func (s *Server) Quiesce()

Quiesce rejects new controller work, drains autonomous planners, and stops device motion before HTTP shutdown waits for active handlers.

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
}

VersionInfo identifies the build served by the HTTP API.

Jump to

Keyboard shortcuts

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