Documentation
¶
Overview ¶
Package consoleui serves w17ctl's local web app — a human-facing view and controller over the dev-machine-local project registry (devconfig), each project's lock, and the local Docker daemon. It is the GUI counterpart to the `w17ctl project` / `stack` CLI: the CLI is the surface coding agents drive, this is the surface a human clicks.
It introduces no new source of truth — it reads ~/.w17/config.yaml, w17/lock.yaml, and `docker compose ps` / `docker stats`, and drives the same compose lifecycle the CLI drives. Bind to 127.0.0.1 only: the local Docker socket is root-equivalent on the host.
Index ¶
Constants ¶
const HealthApp = "w17ctl-ui"
HealthApp is the marker an `/api/healthz` response carries so the `w17ctl ui start` launcher can tell OUR server apart from some other process that happens to hold the port.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
ID string `json:"id"`
Name string `json:"name"`
Service string `json:"service"`
Image string `json:"image"`
State string `json:"state"` // running / exited / …
Status string `json:"status"` // "Up 3 minutes", "Exited (0) …"
Ports string `json:"ports"`
// Live resource use, filled from `docker stats` (empty when the
// container is not running or stats are unavailable).
CPUPerc string `json:"cpuPerc,omitempty"`
MemUsage *string `json:"memUsage,omitempty"`
MemPerc string `json:"memPerc,omitempty"`
}
Container is one row of `docker compose ps` / `docker stats`, flattened to the fields the UI shows. Names mirror docker's JSON keys so the frontend can rely on them.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the local UI HTTP server.
type ServiceLink ¶
type ServiceLink struct {
Label string `json:"label"`
URL string `json:"url"`
Kind string `json:"kind"` // gateway | mcp | admin | trace | db | bus | other
Service string `json:"service"`
Web bool `json:"web"` // browser-navigable (http) vs raw TCP (db/bus)
}
ServiceLink is a friendly, typed link to a running service derived from a host-port slot — the "jump to the admin / gateway / Jaeger" affordance.