コード例 #1
0
def raw_thrift_client(endpoint):
    pool = ThriftConnectionPool(endpoint)
    with pool.connection() as client_protocol:
        yield TestService.Client(client_protocol)
コード例 #2
0
ファイル: healthcheck.py プロジェクト: ckwang8128/baseplate
def check_thrift_service(endpoint):
    pool = ThriftConnectionPool(endpoint, size=1, timeout=TIMEOUT)
    with pool.connection() as protocol:
        client = BaseplateService.Client(protocol)
        assert client.is_healthy(), "service indicated unhealthiness"
コード例 #3
0
ファイル: healthcheck.py プロジェクト: ckwang8128/baseplate
def check_thrift_service(endpoint):
    pool = ThriftConnectionPool(endpoint, size=1, timeout=TIMEOUT)
    with pool.connection() as protocol:
        client = BaseplateService.Client(protocol)
        assert client.is_healthy(), "service indicated unhealthiness"