-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thrift_connector 支持multiplexer有用例吗 #50
Comments
class TMultiplexedThriftClient(connection_pool.ThriftClient):
server_name = ''
@classmethod
def get_protoco_factory(self):
# from thrift.protocol.TMultiplexedProtocol import TMultiplexedProtocol
def tmpl(transport):
return TMultiplexedProtocol(TBinaryProtocol.TBinaryProtocol(transport), self.server_name)
return tmpl
@classmethod
def get_transport_factory(self):
# from thrift.transport import TTransport
return TTransport.TFramedTransport
class CommonTMultiplexedThriftClient(TMultiplexedThriftClient):
server_name = 'CommonApiService'
pool = connection_pool.ClientPool(
CommonRpcApiService,
host,
port,
connection_class=CommonTMultiplexedThriftClient,
keepalive=120,
max_conn=10
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
一直没有对接成功,
The text was updated successfully, but these errors were encountered: