tui

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tui is the router panel: a Bubble Tea program over the control sockets of every registry endpoint, with a Sessions tab and per-session tabs Now, Routes, Policy, Classifier and Usage. RenderFleetView is pure so docs images can be produced from fixture data.

Index

Constants

This section is empty.

Variables

Presets lists the policy presets in cycling order.

Tabs lists the tabs of one session, keys 1-5, in display order.

Functions

func RenderFleetView added in v0.3.0

func RenderFleetView(v FleetView) string

RenderFleetView draws v with ANSI colors. Output depends only on v.

func Run

func Run(ctx context.Context, o Options) error

Run shows the panel until the user quits or ctx ends. It redials lost endpoints while their registry entries remain.

Types

type FleetView added in v0.3.0

type FleetView struct {
	Homes    []home.Home
	Sessions []route.SessionInfo
	Brains   map[string]time.Duration
	Focus    string
	Snap     route.Snapshot // the focused session's snapshot
	Tab      Tab
	Width    int
	Locked   bool // a panel run with --session: no top bar, no Sessions tab
}

FleetView is what RenderFleetView draws for the docs images. Each session is on its own endpoint, as stage 1 launchers run them, unless its home is in Brains: then one brain serves the home, and the value is how long it has run.

type Options

type Options struct {
	Socket   string
	Registry string
	Session  string
}

Options configure Run. Socket, when set, shows that one endpoint and skips the registry; else the panel watches the registry dir Registry. Session, when set, locks the panel to that session id; else it shows all.

type Tab

type Tab string

Tab is one panel tab, in key order 0-5.

const (
	TabSessions   Tab = "sessions" // tab 0, only when the panel shows all sessions
	TabNow        Tab = "now"
	TabRoutes     Tab = "routes"
	TabPolicy     Tab = "policy"
	TabClassifier Tab = "classifier"
	TabUsage      Tab = "usage"
)

Jump to

Keyboard shortcuts

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