"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",
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)
}
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
}