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
Click to show internal directories.
Click to hide internal directories.