def GetState(self, request, context): key = request.key if key not in self.store: return empty_pb2.Empty() else: data, etag = self.store[key] if request.metadata["upper"]: data = to_bytes(data.decode("utf-8").upper()) return api_v1.GetStateResponse(data=data, etag=etag)
def GetState(self, request, context): key = request.key if key not in self.store: return empty_pb2.Empty() else: return api_v1.GetStateResponse(data=self.store[key], etag="")