view

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

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

Layout orchestrates views and page navigation.

func NewLayout

func NewLayout() *Layout

NewLayout creates the main application layout.

func (*Layout) Flash

func (l *Layout) Flash(level ui.FlashLevel, msg string)

Flash shows a flash message.

func (*Layout) Run

func (l *Layout) Run() error

Run starts the TUI application.

type LogsView

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

LogsView displays streaming logs for one or more processes.

func NewLogsView

func NewLogsView(app *ui.App) *LogsView

NewLogsView creates a new log viewer.

func (*LogsView) AllProcesses added in v1.0.1

func (lv *LogsView) AllProcesses() []pm2.Process

AllProcesses returns the process list last passed to ShowAll.

func (*LogsView) Layout

func (lv *LogsView) Layout() *tview.Flex

Layout returns the root layout.

func (*LogsView) Mode added in v1.0.1

func (lv *LogsView) Mode() logMode

Mode returns the current log mode.

func (*LogsView) SetFilter added in v1.0.1

func (lv *LogsView) SetFilter(f pm2.LogFilter)

SetFilter changes the log filter and restarts the current tailer.

func (*LogsView) ShowAll added in v1.0.1

func (lv *LogsView) ShowAll(procs []pm2.Process)

ShowAll starts tailing all given processes (default mode).

func (*LogsView) ShowMulti added in v1.0.1

func (lv *LogsView) ShowMulti(procs []pm2.Process)

ShowMulti starts tailing a subset of processes.

func (*LogsView) ShowSingle added in v1.0.1

func (lv *LogsView) ShowSingle(proc pm2.Process)

ShowSingle starts tailing a single process.

func (*LogsView) Stop

func (lv *LogsView) Stop()

Stop stops the active tailer.

func (*LogsView) ToggleAutoScroll added in v1.0.1

func (lv *LogsView) ToggleAutoScroll()

func (*LogsView) ToggleStream added in v1.0.1

func (lv *LogsView) ToggleStream()

func (*LogsView) ToggleWordWrap added in v1.0.1

func (lv *LogsView) ToggleWordWrap()

type ProcessView

type ProcessView struct {
	Filtering  bool
	Commanding bool
	// contains filtered or unexported fields
}

ProcessView displays the process table.

func NewProcessView

func NewProcessView(app *ui.App, m *model.ProcessTable) *ProcessView

NewProcessView creates a new process table view.

func (*ProcessView) ClearFilter

func (pv *ProcessView) ClearFilter()

ClearFilter clears the active filter and hides the filter bar. Safe to call from the event loop.

func (*ProcessView) ClearSelections added in v1.0.1

func (pv *ProcessView) ClearSelections()

ClearSelections deselects all toggled processes and updates the log view.

func (*ProcessView) Layout

func (pv *ProcessView) Layout() *tview.Flex

Layout returns the root flex layout.

func (*ProcessView) SelectedProcesses added in v1.0.1

func (pv *ProcessView) SelectedProcesses() []pm2.Process

SelectedProcesses returns the processes currently toggled via Space.

func (*ProcessView) SetOnCommand

func (pv *ProcessView) SetOnCommand(fn func(string))

SetOnCommand registers a callback invoked when the user executes a command.

func (*ProcessView) SetOnDelete

func (pv *ProcessView) SetOnDelete(fn func(pm2.Process))

SetOnDelete sets the callback for delete action.

func (*ProcessView) SetOnRestart

func (pv *ProcessView) SetOnRestart(fn func(pm2.Process))

SetOnRestart sets the callback for restart action.

func (*ProcessView) SetOnSelectionChange added in v1.0.1

func (pv *ProcessView) SetOnSelectionChange(fn func([]pm2.Process))

SetOnSelectionChange sets the callback invoked when Space-toggle selections change.

func (*ProcessView) SetOnStart

func (pv *ProcessView) SetOnStart(fn func(pm2.Process))

SetOnStart sets the callback for start action.

func (*ProcessView) SetOnStop

func (pv *ProcessView) SetOnStop(fn func(pm2.Process))

SetOnStop sets the callback for stop action.

func (*ProcessView) SetOnViewLogs

func (pv *ProcessView) SetOnViewLogs(fn func(pm2.Process))

SetOnViewLogs sets the callback for when user presses Enter.

func (*ProcessView) UpdateProcesses

func (pv *ProcessView) UpdateProcesses(procs []pm2.Process)

UpdateProcesses updates the table with the given process list.

Jump to

Keyboard shortcuts

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