def __init__(self, addr): self._lock = threading.Lock() self._channel = make_insecure_channel(addr, ChannelType.REMOTE) self._stub = dj_grpc.RsaPsiSignServiceStub(self._channel) self._serial_fail_cnt = 0 self._rpc_ref_cnt = 0 self._mark_error = False
def __init__(self, id_batch_fetcher, max_flying_item, process_pool_executor, public_key, leader_signer_addr): super(FollowerPsiRsaSigner, self).__init__(id_batch_fetcher, max_flying_item, process_pool_executor) self._public_key = public_key channel = make_insecure_channel(leader_signer_addr, ChannelType.REMOTE) self._leader_signer_stub = dj_grpc.RsaPsiSignServiceStub(channel)
def __init__(self, addr): self._lock = threading.Lock() self._channel = make_insecure_channel( addr, ChannelType.REMOTE, options=[('grpc.max_send_message_length', 2**31 - 1), ('grpc.max_receive_message_length', 2**31 - 1)]) self._stub = dj_grpc.RsaPsiSignServiceStub(self._channel) self._serial_fail_cnt = 0 self._rpc_ref_cnt = 0 self._mark_error = False