Documentation
¶
Index ¶
- type Layout
- type LogsView
- func (lv *LogsView) AllProcesses() []pm2.Process
- func (lv *LogsView) Layout() *tview.Flex
- func (lv *LogsView) Mode() logMode
- func (lv *LogsView) SetFilter(f pm2.LogFilter)
- func (lv *LogsView) ShowAll(procs []pm2.Process)
- func (lv *LogsView) ShowMulti(procs []pm2.Process)
- func (lv *LogsView) ShowSingle(proc pm2.Process)
- func (lv *LogsView) Stop()
- func (lv *LogsView) ToggleAutoScroll()
- func (lv *LogsView) ToggleStream()
- func (lv *LogsView) ToggleWordWrap()
- type ProcessView
- func (pv *ProcessView) ClearFilter()
- func (pv *ProcessView) ClearSelections()
- func (pv *ProcessView) Layout() *tview.Flex
- func (pv *ProcessView) SelectedProcesses() []pm2.Process
- func (pv *ProcessView) SetOnCommand(fn func(string))
- func (pv *ProcessView) SetOnDelete(fn func(pm2.Process))
- func (pv *ProcessView) SetOnRestart(fn func(pm2.Process))
- func (pv *ProcessView) SetOnSelectionChange(fn func([]pm2.Process))
- func (pv *ProcessView) SetOnStart(fn func(pm2.Process))
- func (pv *ProcessView) SetOnStop(fn func(pm2.Process))
- func (pv *ProcessView) SetOnViewLogs(fn func(pm2.Process))
- func (pv *ProcessView) UpdateProcesses(procs []pm2.Process)
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.
type LogsView ¶
type LogsView struct {
// contains filtered or unexported fields
}
LogsView displays streaming logs for one or more processes.
func (*LogsView) AllProcesses ¶ added in v1.0.1
AllProcesses returns the process list last passed to ShowAll.
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
SetFilter changes the log filter and restarts the current tailer.
func (*LogsView) ShowAll ¶ added in v1.0.1
ShowAll starts tailing all given processes (default mode).
func (*LogsView) ShowSingle ¶ added in v1.0.1
ShowSingle starts tailing a single process.
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.