tui

package
v0.0.0-...-6e635d1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogPreview

func NewLogPreview(config LogPreviewConfig) (completed bool, statusError *olm.StatusError, err error)

NewLogPreview creates and runs a new log preview TUI Returns completed status, error from status (if any), and any TUI error

Types

type ExitCondition

type ExitCondition func(client *olm.Client, status *olm.StatusResponse) (shouldExit bool, completed bool)

ExitCondition is a function that determines if the preview should exit Returns true if should exit, and a completion status (true = success, false = user cancelled)

type LogPreviewConfig

type LogPreviewConfig struct {
	LogFile         string
	Header          string
	ExitCondition   ExitCondition
	OnEarlyExit     func(client *olm.Client)                         // Called when user exits early (Ctrl+C)
	OnError         func(client *olm.Client, error *olm.StatusError) // Called when error is detected before registration
	StatusFormatter StatusFormatter                                  // Status formatter (required)
}

LogPreviewConfig configures the log preview TUI

type StatusFormatter

type StatusFormatter func(isRunning bool, status *olm.StatusResponse) string

StatusFormatter is a function that formats the status display

Jump to

Keyboard shortcuts

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