Commit 2af0c87
Add Signal handler for low-latency LPS config notifications
Open a long-lived GET /api/v1/signal stream to the Local Profile Server
and, upon each incoming Signal message, immediately trigger the listed
endpoints' pollers -- bypassing the ~1-minute periodic cadence while
preserving it as the correctness fallback. This removes the minute-scale
delay that operators previously saw between entering a config change in
the LPS UI and EVE picking it up.
The Signal handler runs as an additional LocalCmdAgent goroutine.
Connection open is guarded by the existing startTask/runInterruptible/
endTask pattern used by the other pollers; the long body read runs
without the task lock so it cannot block pause(). On URL change,
UpdateLpsConfig cancels the in-flight stream and wakes the goroutine,
which reconnects against the current LPS address. Dispatches are
rate-limited (1 signal / 3s, burst 3). LPS 404 throttles reconnect
attempts to once per hour. No watchdog is registered -- a legitimately
long blocking Read must not trigger a device reboot.
A new controllerconn.Client.OpenLocalStream helper provides the
streaming HTTP client (reuses DialerWithResolverCache, adds TCP
keepalive for dead-peer detection, disables HTTP keep-alive for clean
connection teardown, and drops the per-request timeout that SendLocal
applies). The existing triggerProfileGET is exported as
TriggerProfileGET for symmetry with the other Trigger*POST helpers.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Milan Lenco <[email protected]>1 parent caca29d commit 2af0c87
4 files changed
Lines changed: 435 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1391 | 1391 | | |
1392 | 1392 | | |
1393 | 1393 | | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
1394 | 1469 | | |
1395 | 1470 | | |
1396 | 1471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| 368 | + | |
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
| |||
375 | 384 | | |
376 | 385 | | |
377 | 386 | | |
| 387 | + | |
378 | 388 | | |
379 | 389 | | |
380 | 390 | | |
| |||
482 | 492 | | |
483 | 493 | | |
484 | 494 | | |
485 | | - | |
| 495 | + | |
486 | 496 | | |
487 | 497 | | |
488 | 498 | | |
| |||
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
| 507 | + | |
497 | 508 | | |
498 | 509 | | |
499 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments