feat(cluster): add distributed probing foundation #9
Reference in New Issue
Block a user
Delete Branch "feat/distributed-probing-foundation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ProbeNodemodel andnodestable (SQLite + Postgres) for probe registrationnode_idcolumn tocheck_historyfor multi-source check trackingStoreinterface with node CRUD andSaveCheckFromNodeUpsertNodeSQLtoDialectinterface (INSERT OR REPLACE / ON CONFLICT)POST /api/probe/register,GET /api/probe/assignments,POST /api/probe/resultsSaveCheckwrapsSaveCheckFromNodewith empty node_idPhase 1 of 3 — Distributed Probing
Foundation layer only. Results are stored to DB but not yet aggregated into engine state. Probe execution mode comes in Phase 2.
Test plan
go test ./...passesnode_idcolumn andnodestable without data losscurl -X POST -H "X-Upkeep-Secret: <key>" -d '{"id":"test","name":"Test","region":"local"}' /api/probe/registerreturns 200curl -H "X-Upkeep-Secret: <key>" /api/probe/assignmentsreturns non-paused, non-push/group sitescurl -X POST -H "X-Upkeep-Secret: <key>" -d '{"node_id":"test","results":[{"site_id":1,"latency_ns":5000000,"is_up":true}]}' /api/probe/resultsreturns 200