예제 #1
0
파일: sdk_worker.py 프로젝트: ovaltzer/beam
 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
예제 #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
예제 #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