コード例 #1
0
    def get_srv_keyspace(self, name):
        try:
            request = vtgate_pb2.GetSrvKeyspaceRequest(keyspace=name, )
            response = self.stub.GetSrvKeyspace(request, self.timeout)
            return self.keyspace_from_response(name, response)

        except (face.AbortionError, vtgate_utils.VitessError) as e:
            raise _convert_exception(e, keyspace=name)
コード例 #2
0
ファイル: grpc_vtgate_client.py プロジェクト: Rastusik/vitess
    def get_srv_keyspace(self, name):
        try:
            request = vtgate_pb2.GetSrvKeyspaceRequest(keyspace=name, )
            response = self.stub.GetSrvKeyspace(request, self.timeout)
            return keyspace.Keyspace(
                name,
                keyrange_constants.srv_keyspace_proto3_to_old(
                    response.srv_keyspace))

        except (face.AbortionError, vtgate_utils.VitessError) as e:
            raise _convert_exception(e, keyspace=name)