| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 1 | # Generated by the Protocol Buffers compiler. DO NOT EDIT! |
| 2 | # source: osm_ee/frontend.proto |
| 3 | # plugin: grpclib.plugin.main |
| 4 | import abc |
| 5 | import typing |
| 6 | |
| 7 | import grpclib.const |
| 8 | import grpclib.client |
| 9 | if typing.TYPE_CHECKING: |
| 10 | import grpclib.server |
| 11 | |
| 12 | import osm_ee.frontend_pb2 |
| 13 | |
| 14 | |
| 15 | class FrontendExecutorBase(abc.ABC): |
| 16 | |
| 17 | @abc.abstractmethod |
| 18 | async def RunPrimitive(self, stream: 'grpclib.server.Stream[osm_ee.frontend_pb2.PrimitiveRequest, osm_ee.frontend_pb2.PrimitiveReply]') -> None: |
| 19 | pass |
| 20 | |
| 21 | @abc.abstractmethod |
| 22 | async def GetSshKey(self, stream: 'grpclib.server.Stream[osm_ee.frontend_pb2.SshKeyRequest, osm_ee.frontend_pb2.SshKeyReply]') -> None: |
| 23 | pass |
| 24 | |
| 25 | def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: |
| 26 | return { |
| 27 | '/osm_ee.FrontendExecutor/RunPrimitive': grpclib.const.Handler( |
| 28 | self.RunPrimitive, |
| 29 | grpclib.const.Cardinality.UNARY_STREAM, |
| 30 | osm_ee.frontend_pb2.PrimitiveRequest, |
| 31 | osm_ee.frontend_pb2.PrimitiveReply, |
| 32 | ), |
| 33 | '/osm_ee.FrontendExecutor/GetSshKey': grpclib.const.Handler( |
| 34 | self.GetSshKey, |
| 35 | grpclib.const.Cardinality.UNARY_UNARY, |
| 36 | osm_ee.frontend_pb2.SshKeyRequest, |
| 37 | osm_ee.frontend_pb2.SshKeyReply, |
| 38 | ), |
| 39 | } |
| 40 | |
| 41 | |
| 42 | class FrontendExecutorStub: |
| 43 | |
| 44 | def __init__(self, channel: grpclib.client.Channel) -> None: |
| 45 | self.RunPrimitive = grpclib.client.UnaryStreamMethod( |
| 46 | channel, |
| 47 | '/osm_ee.FrontendExecutor/RunPrimitive', |
| 48 | osm_ee.frontend_pb2.PrimitiveRequest, |
| 49 | osm_ee.frontend_pb2.PrimitiveReply, |
| 50 | ) |
| 51 | self.GetSshKey = grpclib.client.UnaryUnaryMethod( |
| 52 | channel, |
| 53 | '/osm_ee.FrontendExecutor/GetSshKey', |
| 54 | osm_ee.frontend_pb2.SshKeyRequest, |
| 55 | osm_ee.frontend_pb2.SshKeyReply, |
| 56 | ) |