Problem: probe logic (checkHTTP, checkTCP, checkPing, checkDNS, checkSSHScript, etc.) was embedded inside scheduler/scheduler.go as unexported functions coupled to sqlcgen types — unreachable from the core ObservationService the hexagonal refactor needs. Change: - adapters/probes/network.go: HTTP, TCP, ping, and DNS probe adapters implementing ports.Checker. Each parses CheckDef.Config (json map), runs the probe against the Target, and returns a ports.CheckResult. configMap helper unmarshals config JSON; parseStr/parseFloat extract typed values. - adapters/probes/ssh.go: SSHChecker wraps actuator.Dial + RunCombinedOutput with a SignerSource for key resolution. Registry (map[string]ports.Checker) with NewRegistry() pre-populating all known kinds (ssh-script, vm-status, backup-freshness, cert-expiry set to nil — filled by the ObservationService when signers are available). Verification: go build/vet, full test suite (19 pkgs), DB integration (postgres + mcp — green).
7 B
7 B