bdd_grpc_util.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:fabric-test 作者: hyperledger 项目源码 文件源码
def getGRPCChannel(ipAddress, port, root_certificates, ssl_target_name_override):
    # channel = grpc.insecure_channel("{0}:{1}".format(ipAddress, 7051), options = [('grpc.max_message_length', 100*1024*1024)])
    # creds = grpc.ssl_channel_credentials(root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain)
    creds = grpc.ssl_channel_credentials(root_certificates=root_certificates)
    channel = grpc.secure_channel("{0}:{1}".format(ipAddress, port), creds,
                                  options=(('grpc.ssl_target_name_override', ssl_target_name_override,),('grpc.default_authority', ssl_target_name_override,),('grpc.max_receive_message_length', 100*1024*1024)))

    # print("Returning GRPC for address: {0}".format(ipAddress))
    return channel
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号