]> go.fuhry.dev Git - runtime.git/commitdiff
[cmd/sd_*] remove some verbose logs, improve error reporting
authorDan Fuhry <dan@fuhry.com>
Mon, 19 Oct 2026 21:20:21 +0000 (17:20 -0400)
committerDan Fuhry <dan@fuhry.com>
Mon, 19 Oct 2026 21:28:54 +0000 (17:28 -0400)
MODULE.bazel.lock
cmd/sd_register/main.go
cmd/sd_watcher/main.go

index 4e6edeca5f145edaab9499d063c0cc5c2350805f..66016cc0544ee7d353ad1a83894a8c1d105a955d 100644 (file)
@@ -86,6 +86,8 @@
     "https://bcr.bazel.build/modules/googletest/1.15.2/MODULE.bazel": "6de1edc1d26cafb0ea1a6ab3f4d4192d91a312fd2d360b63adaa213cd00b2108",
     "https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46",
     "https://bcr.bazel.build/modules/googletest/1.17.0/source.json": "38e4454b25fc30f15439c0378e57909ab1fd0a443158aa35aec685da727cd713",
+    "https://bcr.bazel.build/modules/hermetic_cc_toolchain/4.3.0/MODULE.bazel": "4157d273074a1876fa674deca1e551bad66f06b87da1603dd856244e97b7ced8",
+    "https://bcr.bazel.build/modules/hermetic_cc_toolchain/4.3.0/source.json": "ce6a4b5621b88b8707e362419d9972cc9669d5c24cec2a7610483a94be8fa4ae",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6.bcr.2/MODULE.bazel": "64f508885f907ac2518039b3d0c5c1703a8f6137d9f5d635067ba93d33c2670a",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6.bcr.2/source.json": "13199fa0a267ca46814e9e6ab313a71890c8f1822e57376fdc23a2d2cd384051",
index 3db2a501d04b2ba47e9d592cb2a24337ce31439c..de25cf305516d327046b9ccb9c25842022158cea 100644 (file)
@@ -104,17 +104,17 @@ func main() {
 func processAndStart(ctx context.Context, p, domain string, regions []string, shutdownWaits *sync.WaitGroup) {
        contents, err := os.ReadFile(p)
        if err != nil {
-               panic(err)
+               log.Panicf("failed to read config file %q: %v", p, err)
        }
 
        svc, err := sd.LoadHealthCheck(contents)
        if err != nil {
-               panic(err)
+               log.Panicf("loading health check from %q failed: %v", p, err)
        }
 
        publisher, err := sd.NewHealthCheckPublisher(svc, domain, regions)
        if err != nil {
-               panic(err)
+               log.Panicf("creating publisher for config %q failed: %v", p, err)
        }
        go publisher.MonitorAndPublish(ctx, shutdownWaits)
 }
index 63d814d427d3d4389131639bd9bedd6fb5678920..b2d07c97d279011bc5c6dafee49775c516c92d50 100644 (file)
@@ -60,8 +60,6 @@ mainLoop:
                select {
                case addrs = <-updates:
                        fmt.Printf("items updated: %v\n", addrs)
-               case <-ticker.C:
-                       fmt.Printf("items have not changed: %v\n", addrs)
                case <-ctx.Done():
                        break mainLoop
                }