Documentation
¶
Overview ¶
Package systemd provides a TUI component that lists, inspects, and manages systemd --user services whose names start with "pcloud-sync-".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionsDialog ¶ added in v1.3.0
type ActionsDialog struct {
// contains filtered or unexported fields
}
ActionsDialog presents an action menu for a selected systemd unit.
func NewActionsDialog ¶ added in v1.3.0
func NewActionsDialog(unit Unit, width, height int) ActionsDialog
NewActionsDialog creates an action picker for the given unit.
func (ActionsDialog) Init ¶ added in v1.3.0
func (m ActionsDialog) Init() tea.Cmd
func (ActionsDialog) View ¶ added in v1.3.0
func (m ActionsDialog) View() tea.View
type LogsDialog ¶
type LogsDialog struct {
// contains filtered or unexported fields
}
LogsDialog is a tea.Model that renders journal output for a systemd unit in a scrollable viewport. It is shown via msgs.ShowDialogMsg and closes with msgs.CloseDialogMsg when the user presses q or esc.
func NewLogsDialog ¶
func NewLogsDialog(unit string, width, height int) LogsDialog
NewLogsDialog builds a LogsDialog for the given unit name. width and height are the current terminal dimensions.
func (LogsDialog) Init ¶
func (m LogsDialog) Init() tea.Cmd
func (LogsDialog) View ¶
func (m LogsDialog) View() tea.View
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the systemd daemon manager TUI component. It satisfies the same component interface as filebrowser.Model: Init/Update/(View string), not a full tea.Model.
type RemoveDialog ¶ added in v1.3.0
type RemoveDialog struct {
// contains filtered or unexported fields
}
RemoveDialog asks the user to confirm, then stops, disables, and deletes the systemd unit file for the selected sync daemon.
func NewRemoveDialog ¶ added in v1.3.0
func NewRemoveDialog(unit Unit, width, height int) RemoveDialog
NewRemoveDialog creates a remove confirmation dialog for the given unit.
func (RemoveDialog) Init ¶ added in v1.3.0
func (m RemoveDialog) Init() tea.Cmd
func (RemoveDialog) View ¶ added in v1.3.0
func (m RemoveDialog) View() tea.View
type Unit ¶
type Unit struct {
Name string // full unit name, e.g. "pcloud-sync-Music.service"
ActiveState string // "active", "inactive", "failed", …
EnabledState string // "enabled", "disabled", "static", …
Mode string // sync direction: "down" or "up"
}
Unit represents a single pcloud-sync systemd user service.