webui

package
v2.7.0-dev.5 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package webui embeds a pinned release of the mast-web operator UI (github.com/go-steer/mast-web) so the agent binary can serve it at /ui/* on its attach listener when the --ui flag is set.

The dist/ subdirectory is populated at build time by dev/tools/fetch-mast-web (which downloads the release tagged in the top-level .mast-web-version file). A .gitkeep file ensures the directory exists on a fresh clone so //go:embed succeeds even before fetch-mast-web has run; in that state HasAssets returns false and the --ui startup path emits a clear operator-facing error instead of serving an empty UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() (fs.FS, error)

FS returns the embedded SPA file system rooted at dist/. Always succeeds — the //go:embed directive is satisfied by the .gitkeep placeholder when fetch-mast-web hasn't been run. Use HasAssets to check whether the bundle is actually populated.

func HasAssets

func HasAssets() bool

HasAssets reports whether the embedded bundle contains a real SPA (presence of dist/index.html), as opposed to just the .gitkeep placeholder. Used by the --ui startup path to fail fast with a useful error when the build didn't populate the assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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