Documentation
¶
Overview ¶
keymap.go declares all keyboard shortcuts used in the TUI. Keeping keybindings in one place makes them easy to document and modify.
model.go defines the Bubble Tea Model — the single source of truth for all TUI state.
Bubble Tea follows The Elm Architecture (TEA):
Model — what the app knows (state) Update — how state changes in response to messages View — how state is rendered to the terminal
start.go is the entry point into the TUI subsystem. It wires together the Docker client and the Bubble Tea program.
update.go implements the Bubble Tea Update function. It handles all incoming messages (key presses, ticks, fetched data) and returns a new Model + optional Command to run next.
view.go implements the Bubble Tea View function. It converts the current Model state into a string that Bubble Tea renders to the terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(opts StartOptions) error
Start connects to Docker (or uses demo data), builds the model, and runs the TUI. Demo mode runs without a live Docker daemon. Host overrides DOCKER_HOST when non-empty (e.g. "tcp://192.168.1.100:2375").
Types ¶
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Enter key.Binding
Back key.Binding
Tab key.Binding
Refresh key.Binding
Logs key.Binding
Delete key.Binding // force-remove a container
Chart key.Binding // full-screen stats history chart
Quit key.Binding
}
KeyMap holds all named key bindings.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the entire application state.
func (Model) Init ¶
Init implements tea.Model. Starts the spinner, first data fetch, and event streaming. Event streaming begins immediately so the timeline is populated from app launch — not deferred to the first Events tab visit.
type Panel ¶
type Panel int
Panel represents which section of the dashboard is active.
const PanelEvents Panel = PanelProblems
PanelEvents is a compatibility alias for the retired event timeline label.
const PanelNetworks Panel = -1
PanelNetworks is kept as a compatibility sentinel for retired view code.
type Problem ¶ added in v0.5.0
type Problem struct {
Severity string
Kind string
Name string
Detail string
Recommendation string
Since time.Time
}
Problem is an actionable condition derived from the Docker event stream. Normal lifecycle events are intentionally omitted from this view.
type StartOptions ¶ added in v0.8.0
StartOptions configures the TUI entry point.