Documentation
¶
Index ¶
- Constants
- func Classify(width, height int) ui.SizeClass
- func RequiresConfirmation(action Action) bool
- func RequiresDaemon(action Action) bool
- func Run(ctx context.Context, options Options) error
- type Action
- type Layout
- type Modal
- type ModalAction
- type ModalConfirmedMsg
- type Model
- type MonitorModel
- func (m *MonitorModel) Observe(event session.Event)
- func (m *MonitorModel) ObserveConnections(connections protocol.ConnectionList)
- func (m *MonitorModel) ObserveMemory(inUse int64)
- func (m *MonitorModel) ObserveTraffic(up, down int64)
- func (m *MonitorModel) SetStale(stale bool)
- func (m MonitorModel) Snapshot() ui.MonitorSnapshot
- func (m MonitorModel) Traffic() []ui.TrafficPoint
- func (m MonitorModel) ViewFull(width, height int) string
- func (m MonitorModel) ViewNumbers(width int) string
- func (m MonitorModel) ViewSummary(_ int) string
- type OperationRecordMsg
- type Options
Constants ¶
const ( DeleteSubscription = ui.ActionDeleteSubscription CloseAllConnections = ui.ActionCloseAllConnections UpdateAllProviders = ui.ActionUpdateAllProviders RollbackPanel = ui.ActionRollbackPanel RestartCore = ui.ActionRestartCore UpdateCore = ui.ActionUpdateCore ApplyEndpointChange = ui.ActionApplyEndpointChange SelectProxy = ui.ActionSelectProxy CloseConnection = ui.ActionCloseConnection RefreshSubscription = ui.ActionRefreshSubscription RefreshAllSubscriptions = ui.ActionRefreshAllSubscriptions UpdateProvider = ui.ActionUpdateProvider InstallPanel = ui.ActionInstallPanel UpdatePanel = ui.ActionUpdatePanel ActivatePanel = ui.ActionActivatePanel OpenWebGUI = ui.ActionOpenWebGUI UninstallPanel = ui.ActionUninstallPanel ReinstallPanel = ui.ActionReinstallPanel ServiceInstall = ui.ActionServiceInstall ServiceUninstall = ui.ActionServiceUninstall ServiceReinstall = ui.ActionServiceReinstall ServiceStart = ui.ActionServiceStart ServiceStop = ui.ActionServiceStop ServiceRestart = ui.ActionServiceRestart EnableSystemProxy = ui.ActionEnableSystemProxy ForceSystemProxy = ui.ActionForceSystemProxy DisableSystemProxy = ui.ActionDisableSystemProxy EnableTun = ui.ActionEnableTun DisableTun = ui.ActionDisableTun )
Variables ¶
This section is empty.
Functions ¶
func RequiresConfirmation ¶
func RequiresDaemon ¶
RequiresDaemon reports whether the action needs a live daemon control session. OS service control talks to the local service manager and works while disconnected.
Types ¶
type ModalAction ¶
type ModalAction uint8
const ( ModalNone ModalAction = iota ModalClose ModalConfirm )
type ModalConfirmedMsg ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewModelWithEvents ¶
func (*Model) SetServiceController ¶
func (model *Model) SetServiceController(ctrl systempage.ServiceController)
SetServiceController injects the OS service controller used for the top-right badge and the System page. Safe to call before Run.
func (Model) SetupComplete ¶
SetupComplete reports an authoritative completed onboarding state.
type MonitorModel ¶
type MonitorModel struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func NewMonitor() MonitorModel
func (*MonitorModel) Observe ¶
func (m *MonitorModel) Observe(event session.Event)
func (*MonitorModel) ObserveConnections ¶
func (m *MonitorModel) ObserveConnections(connections protocol.ConnectionList)
func (*MonitorModel) ObserveMemory ¶
func (m *MonitorModel) ObserveMemory(inUse int64)
func (*MonitorModel) ObserveTraffic ¶
func (m *MonitorModel) ObserveTraffic(up, down int64)
func (*MonitorModel) SetStale ¶
func (m *MonitorModel) SetStale(stale bool)
func (MonitorModel) Snapshot ¶
func (m MonitorModel) Snapshot() ui.MonitorSnapshot
func (MonitorModel) Traffic ¶
func (m MonitorModel) Traffic() []ui.TrafficPoint
func (MonitorModel) ViewFull ¶
func (m MonitorModel) ViewFull(width, height int) string
func (MonitorModel) ViewNumbers ¶
func (m MonitorModel) ViewNumbers(width int) string
func (MonitorModel) ViewSummary ¶
func (m MonitorModel) ViewSummary(_ int) string
type OperationRecordMsg ¶
type OperationRecordMsg struct{ Record ui.OperationRecord }
type Options ¶
type Options struct {
Client *controlclient.Client
Service systempage.ServiceController
Input io.Reader
Output io.Writer
}
Options contains the control client and terminal streams used by the TUI.