pptx704
124e097e23
refactor: eliminate DRY violations across control plane and host agent
Extract shared helpers to consolidate repeated patterns:
- requireRunningSandbox: sandbox lookup + running check (10 call sites)
- upgradeAndAuthenticate: WS upgrade + JWT/API-key auth (3 handlers)
- updateLastActive: last_active_at update with background context (5 sites)
- attachCowAndCreate: cow loop attach + dmsetup create (devicemapper)
- issueRegistrationToken: token gen + Redis + audit (host service)
- ErrNotFound sentinel: replaces string matching in hostagent server
Also merges duplicate wsProcessOut/wsOutMsg types into one.
Net: -208 lines, zero behavior change.
2026-05-17 02:03:06 +06:00
..
2026-05-17 02:03:06 +06:00
2026-04-25 04:21:55 +06:00
2026-05-15 12:25:16 +06:00
2026-04-16 19:24:25 +00:00
2026-04-21 15:41:45 +06:00
2026-04-16 19:24:25 +00:00
2026-04-21 15:41:45 +06:00
2026-04-16 19:24:25 +00:00
2026-05-17 02:03:06 +06:00
2026-05-17 02:03:06 +06:00
2026-05-17 02:03:06 +06:00
2026-05-17 02:03:06 +06:00
2026-05-17 02:03:06 +06:00
2026-05-16 16:15:49 +06:00
2026-04-25 02:00:39 +06:00
2026-04-16 19:24:25 +00:00
2026-04-21 11:03:12 +06:00
2026-05-17 02:03:06 +06:00
2026-05-17 02:03:06 +06:00
2026-05-15 12:25:16 +06:00
2026-05-15 12:25:16 +06:00
2026-04-16 19:24:25 +00:00
2026-04-16 19:24:25 +00:00
2026-04-21 15:41:45 +06:00
2026-03-22 21:01:23 +00:00
2026-04-18 14:29:09 +06:00
2026-05-03 15:24:34 +06:00
2026-04-24 15:48:38 +06:00
2026-05-17 01:33:12 +06:00
2026-04-16 19:24:25 +00:00
2026-04-24 15:48:38 +06:00
2026-04-24 15:48:38 +06:00
2026-04-16 19:24:25 +00:00
2026-04-24 15:48:38 +06:00
2026-05-03 04:47:10 +06:00
2026-05-16 18:32:37 +06:00
2026-05-17 01:33:12 +06:00
2026-05-16 16:15:49 +06:00
2026-04-18 14:29:09 +06:00