zk add client options

This commit is contained in:
Gordon 2023-03-13 13:31:40 +08:00
parent 6187b15a88
commit fed4dbd54f

View File

@ -31,7 +31,7 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
return utils.Wrap1(err)
}
defer zkClient.Close()
zkClient.AddOption(grpc.WithTransportCredentials(insecure.NewCredentials()))
zkClient.AddOption(grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
registerIP, err := network.GetRpcRegisterIP(config.Config.RpcRegisterIP)
if err != nil {
return err