Expand description
Local HTTP control plane and dashboard for LightShuttle.
This crate hosts the developer-facing control surface that runs
alongside the orchestrator: a REST API, a WebSocket log stream and
an SSR dashboard served on 127.0.0.1. CLI subcommands such as
lightshuttle restart are thin clients of the same endpoints.
At v0.2.0 this crate exposes GET /healthz plus REST endpoints
under /api/resources*; subsequent PRs land the WebSocket log
channel, the restart endpoint and the dashboard.
Structs§
- ApiError
- Translates
LifecycleHandleErrorvariants into HTTP status + JSON body. Kept as a plain struct (not an enum) because every handler reduces failures to one of three buckets: not found, not yet implemented, or runtime fault. - ApiError
Body - Wire representation of an API error.
- Control
Server - HTTP server hosting the control plane.
- Control
State - State shared by every route of the control plane.
- Metrics
- Holds the Prometheus render handle and the process start instant.
Functions§
- bind
- Bind a TCP listener on
addr. Pass a port of0to let the OS pick a free port; read it back fromTcpListener::local_addr. - observe_
event_ duration - Observe the seconds a resource took to become healthy. Safe to call from anywhere once the recorder is installed; a no-op when no recorder is present.