Skip to content

Commit

Permalink
fatal if the resolver cannot initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed May 21, 2024
1 parent f6818d9 commit 222be51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/vtgateproxy/vtgateproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,16 @@ func Init() {
return append(opts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, *balancerType))), nil
})

RegisterJSONGateResolver(
_, err := RegisterJSONGateResolver(
*vtgateHostsFile,
*addressField,
*portField,
*poolTypeField,
*affinityField,
*affinityValue,
)

if err != nil {
log.Fatalf("error initializing resolver: %v", err)
}
}

0 comments on commit 222be51

Please sign in to comment.