From 222be51aeb02735be693cc02c4dc29d37082d6b5 Mon Sep 17 00:00:00 2001 From: Michael Demmer Date: Tue, 21 May 2024 16:34:06 -0700 Subject: [PATCH] fatal if the resolver cannot initialize --- go/vt/vtgateproxy/vtgateproxy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/vt/vtgateproxy/vtgateproxy.go b/go/vt/vtgateproxy/vtgateproxy.go index 75b04c74868..db1abe43009 100644 --- a/go/vt/vtgateproxy/vtgateproxy.go +++ b/go/vt/vtgateproxy/vtgateproxy.go @@ -218,7 +218,7 @@ func Init() { return append(opts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, *balancerType))), nil }) - RegisterJSONGateResolver( + _, err := RegisterJSONGateResolver( *vtgateHostsFile, *addressField, *portField, @@ -226,4 +226,8 @@ func Init() { *affinityField, *affinityValue, ) + + if err != nil { + log.Fatalf("error initializing resolver: %v", err) + } }