desktop

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package desktop is the headless / dump-state half of ppz-desktop. The Wails windowed app would consume the same state via DumpState; the windowed frontend lands post-Phase-1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpState

func DumpState(ipcSock string, w io.Writer) error

DumpState writes a single JSON snapshot of the daemon's source view (per WIRE.md §8a) and returns. Sorted by handle ASC.

func RunHeadless

func RunHeadless(ipcSock, httpAddr string) error

RunHeadless: stays alive until SIGINT/SIGTERM. When httpAddr is non-empty, also serves the embedded HTML viewer at / and the JSON snapshot at /api/state — that's what gives the user a browser-accessible "desktop GUI" in docker (where a real Wails window can't be drawn without X11 forwarding).

func ServeHTTP

func ServeHTTP(addr, ipcSock string) error

ServeHTTP starts a tiny HTTP server that:

  • GET / → serves the embedded HTML page
  • GET /api/state → returns the same JSON snapshot --dump-state produces (so the page can poll it on a 1 s interval)

Blocks until the server errors out.

Types

This section is empty.

Jump to

Keyboard shortcuts

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