| 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 |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 9 | |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 10 | if typing.TYPE_CHECKING: |
| 11 | import grpclib.server |
| 12 | |
| 13 | import osm_ee.frontend_pb2 |
| 14 | |
| 15 | |
| 16 | class FrontendExecutorBase(abc.ABC): |
| 17 | |
| 18 | @abc.abstractmethod |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 19 | async def RunPrimitive( |
| 20 | self, |
| 21 | stream: "grpclib.server.Stream[osm_ee.frontend_pb2.PrimitiveRequest, osm_ee.frontend_pb2.PrimitiveReply]", |
| 22 | ) -> None: |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 23 | pass |
| 24 | |
| 25 | @abc.abstractmethod |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 26 | async def GetSshKey( |
| 27 | self, |
| 28 | stream: "grpclib.server.Stream[osm_ee.frontend_pb2.SshKeyRequest, osm_ee.frontend_pb2.SshKeyReply]", |
| 29 | ) -> None: |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 30 | pass |
| 31 | |
| 32 | def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: |
| 33 | return { |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 34 | "/osm_ee.FrontendExecutor/RunPrimitive": grpclib.const.Handler( |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 35 | self.RunPrimitive, |
| 36 | grpclib.const.Cardinality.UNARY_STREAM, |
| 37 | osm_ee.frontend_pb2.PrimitiveRequest, |
| 38 | osm_ee.frontend_pb2.PrimitiveReply, |
| 39 | ), |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 40 | "/osm_ee.FrontendExecutor/GetSshKey": grpclib.const.Handler( |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 41 | self.GetSshKey, |
| 42 | grpclib.const.Cardinality.UNARY_UNARY, |
| 43 | osm_ee.frontend_pb2.SshKeyRequest, |
| 44 | osm_ee.frontend_pb2.SshKeyReply, |
| 45 | ), |
| 46 | } |
| 47 | |
| 48 | |
| 49 | class FrontendExecutorStub: |
| 50 | |
| 51 | def __init__(self, channel: grpclib.client.Channel) -> None: |
| 52 | self.RunPrimitive = grpclib.client.UnaryStreamMethod( |
| 53 | channel, |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 54 | "/osm_ee.FrontendExecutor/RunPrimitive", |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 55 | osm_ee.frontend_pb2.PrimitiveRequest, |
| 56 | osm_ee.frontend_pb2.PrimitiveReply, |
| 57 | ) |
| 58 | self.GetSshKey = grpclib.client.UnaryUnaryMethod( |
| 59 | channel, |
| garciadeblas | 43fc935 | 2024-07-09 14:30:44 +0200 | [diff] [blame] | 60 | "/osm_ee.FrontendExecutor/GetSshKey", |
| lloretgalleg | 1d2ff51 | 2020-08-01 06:05:58 +0000 | [diff] [blame] | 61 | osm_ee.frontend_pb2.SshKeyRequest, |
| 62 | osm_ee.frontend_pb2.SshKeyReply, |
| 63 | ) |