Ejemplo n.º 1
0
 def blocking_get(self, state_key):
     response = self._blocking_request(
         beam_fn_api_pb2.StateRequest(
             state_key=state_key, get=beam_fn_api_pb2.StateGetRequest()))
     if response.get.continuation_token:
         raise NotImplementedError
     return response.get.data
Ejemplo n.º 2
0
 def get_raw(self, state_key, continuation_token=None):
     response = self._blocking_request(
         beam_fn_api_pb2.StateRequest(
             state_key=state_key,
             get=beam_fn_api_pb2.StateGetRequest(
                 continuation_token=continuation_token)))
     return response.get.data, response.get.continuation_token
Ejemplo n.º 3
0
 def get_raw(self,
             state_key,  # type: beam_fn_api_pb2.StateKey
             continuation_token=None  # type: Optional[bytes]
            ):
   # type: (...) -> Tuple[bytes, Optional[bytes]]
   response = self._blocking_request(
       beam_fn_api_pb2.StateRequest(
           state_key=state_key,
           get=beam_fn_api_pb2.StateGetRequest(
               continuation_token=continuation_token)))
   return response.get.data, response.get.continuation_token