server

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package server exposes the engine, run manager and store over a loopback JSON API plus an SSE live-event stream. It is the backend the Tauri desktop UI (Phase 3) talks to; in Phase 2 it is driven entirely by curl/EventSource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wires the HTTP routes to the manager and store.

func New

func New(st *store.Store, mgr *runmanager.Manager, token, version, configPath string) *Server

func (*Server) Handler

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

Handler returns the fully-routed HTTP handler: a token-guarded /api surface and, when a UI is set, the embedded SPA served unauthenticated for all other routes.

func (*Server) SetUI

func (s *Server) SetUI(f fs.FS)

SetUI enables serving the embedded single-page app (and its assets) for every non-/api route. The API stays token-guarded; the UI is served unauthenticated (it's loopback, same-origin with the API, and carries no secrets).

Jump to

Keyboard shortcuts

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