项目作者: bwisgood

项目描述 :
use grpc client with pool
高级语言: Python
项目地址: git://github.com/bwisgood/grpc_client_pool.git
创建时间: 2019-08-05T14:48:29Z
项目社区:https://github.com/bwisgood/grpc_client_pool

开源协议:MIT License

下载


Abstract

This is a base thread pool to catch grpc server connection

How to use

  1. Create a ClientConnectionPool in your client
  2. use ClientConnectionPool.get_one_connection() to allocate a spare connection.
  3. use this connection to create your stub

More

  • ClientConnectionPool.get_connection(conn_id)

Get a connection by connection id

  • ClientConnectionPool.get_connection_state(conn_id)

Get connection state by connection id

  1. Note: Also you can define your own callback handler base on class:DefaultCallBackHandler