Add Starlink status lines for the physical gateway pane (closes #3) (#7)
check / check (push) Failing after 5s
check / check (push) Failing after 5s
Detection is a TCP connect to the dish endpoint bound to the physical interface; once a dish answers, get_status is read every 5s and two status lines render under the physical pane, red on disconnect or alert. No dish: nothing drawn, no RPC. Minimal vendored proto bindings for get_status only. Independent review passed (PR 7 comment 100012). Model: opus-4-8 (implementation and review); model: claude-fable-5 (merge)
This commit was merged in pull request #7.
This commit is contained in:
@@ -19,6 +19,8 @@ import (
|
||||
"time"
|
||||
|
||||
tcell "github.com/gdamore/tcell/v2"
|
||||
|
||||
"git.eeqj.de/sneak/rtnetmon/internal/starlink"
|
||||
)
|
||||
|
||||
// Meter glyphs used to render the ASCII loss meter.
|
||||
@@ -90,6 +92,12 @@ type Monitor struct {
|
||||
// Interfaces to monitor (one or two)
|
||||
interfaces []*InterfaceStatus
|
||||
|
||||
// Starlink status for the physical (non-VPN gateway) pane. All three
|
||||
// are nil unless EnableStarlink was called for a monitored interface.
|
||||
slClient starlink.Client
|
||||
slState *starlinkState
|
||||
slPane *InterfaceStatus
|
||||
|
||||
// Logging
|
||||
logFile string
|
||||
|
||||
@@ -208,6 +216,8 @@ func (m *Monitor) Run(ctx context.Context) error {
|
||||
go m.tcpLoop(ctx, st, tcpHosts)
|
||||
}
|
||||
|
||||
go m.starlinkLoop(ctx)
|
||||
|
||||
m.logf("Starting UI loop")
|
||||
m.uiLoop(ctx)
|
||||
m.logf("UI loop exited, monitor ending")
|
||||
|
||||
Reference in New Issue
Block a user