tui

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package tui provides an interactive terminal dashboard for ToolHive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamProxyLogs

func StreamProxyLogs(ctx context.Context, manager workloads.Manager, name string) <-chan string

StreamProxyLogs polls manager.GetProxyLogs for the given workload and sends new lines to the returned channel. Cancel ctx to stop.

func StreamWorkloadLogs

func StreamWorkloadLogs(ctx context.Context, manager workloads.Manager, name string) <-chan string

StreamWorkloadLogs starts a goroutine that polls manager.GetLogs for the given workload name and sends new log lines to the returned channel. Cancel the context to stop streaming.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the top-level BubbleTea model for the TUI dashboard.

func New

func New(ctx context.Context, manager workloads.Manager, logCh <-chan string) (Model, error)

New creates a new TUI model. logCh (optional) receives slog WARN/ERROR messages captured while the TUI runs.

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts background ticks for workload refresh.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles all incoming messages and key events.

func (Model) View

func (m Model) View() string

View implements tea.Model and renders the full TUI to a string.

Jump to

Keyboard shortcuts

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