tui

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(
	ctx context.Context, r io.Reader,
	svcMapFn func() docker.ServiceMap, filter string,
) error

Run starts the bubbletea TUI. It reads NDJSON records from r, resolves service names via svcMapFn, and optionally filters by service name. It blocks until the user quits or ctx is cancelled.

Types

type EOFMsg

type EOFMsg struct{}

EOFMsg is sent when the capture stream ends.

type ErrMsg

type ErrMsg struct{ Err error }

ErrMsg is sent when an error occurs reading the capture stream.

type Model

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

Model is the bubbletea model for the TUI.

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts listening for the first record.

func (Model) Update

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

Update handles messages.

func (Model) View

func (m Model) View() string

View renders the current view.

type RecordMsg

type RecordMsg struct{ Record model.Record }

RecordMsg is sent when a new record is read from the capture stream.

Jump to

Keyboard shortcuts

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