gitscope
← marzneshin / v0.7.3 / app/marznode/marznode_pb2_grpc.py
https://dev.kronoz.win/r/marzneshin.git
app/marznode/marznode_pb2_grpc.py · Python
Blame Raw
  1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2"""Client and server classes corresponding to protobuf-defined services."""
  3import grpc
  4import warnings
  5
  6from app.marznode import marznode_pb2 as app_dot_marznode_dot_marznode__pb2
  7
  8GRPC_GENERATED_VERSION = '1.65.4'
  9GRPC_VERSION = grpc.__version__
 10EXPECTED_ERROR_RELEASE = '1.66.0'
 11SCHEDULED_RELEASE_DATE = 'August 6, 2024'
 12_version_not_supported = False
 13
 14try:
 15    from grpc._utilities import first_version_is_lower
 16    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
 17except ImportError:
 18    _version_not_supported = True
 19
 20if _version_not_supported:
 21    warnings.warn(
 22        f'The grpc package installed is at version {GRPC_VERSION},'
 23        + f' but the generated code in app/marznode/marznode_pb2_grpc.py depends on'
 24        + f' grpcio>={GRPC_GENERATED_VERSION}.'
 25        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
 26        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
 27        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
 28        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
 29        RuntimeWarning
 30    )
 31
 32
 33class MarzServiceStub(object):
 34    """Missing associated documentation comment in .proto file."""
 35
 36    def __init__(self, channel):
 37        """Constructor.
 38
 39        Args:
 40            channel: A grpc.Channel.
 41        """
 42        self.SyncUsers = channel.stream_unary(
 43                '/marznode.MarzService/SyncUsers',
 44                request_serializer=app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
 45                response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 46                _registered_method=True)
 47        self.RepopulateUsers = channel.unary_unary(
 48                '/marznode.MarzService/RepopulateUsers',
 49                request_serializer=app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
 50                response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 51                _registered_method=True)
 52        self.FetchBackends = channel.unary_unary(
 53                '/marznode.MarzService/FetchBackends',
 54                request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 55                response_deserializer=app_dot_marznode_dot_marznode__pb2.BackendsResponse.FromString,
 56                _registered_method=True)
 57        self.FetchUsersStats = channel.unary_unary(
 58                '/marznode.MarzService/FetchUsersStats',
 59                request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 60                response_deserializer=app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
 61                _registered_method=True)
 62        self.FetchBackendConfig = channel.unary_unary(
 63                '/marznode.MarzService/FetchBackendConfig',
 64                request_serializer=app_dot_marznode_dot_marznode__pb2.Backend.SerializeToString,
 65                response_deserializer=app_dot_marznode_dot_marznode__pb2.BackendConfig.FromString,
 66                _registered_method=True)
 67        self.RestartBackend = channel.unary_unary(
 68                '/marznode.MarzService/RestartBackend',
 69                request_serializer=app_dot_marznode_dot_marznode__pb2.RestartBackendRequest.SerializeToString,
 70                response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 71                _registered_method=True)
 72        self.StreamBackendLogs = channel.unary_stream(
 73                '/marznode.MarzService/StreamBackendLogs',
 74                request_serializer=app_dot_marznode_dot_marznode__pb2.BackendLogsRequest.SerializeToString,
 75                response_deserializer=app_dot_marznode_dot_marznode__pb2.LogLine.FromString,
 76                _registered_method=True)
 77        self.GetBackendStats = channel.unary_unary(
 78                '/marznode.MarzService/GetBackendStats',
 79                request_serializer=app_dot_marznode_dot_marznode__pb2.Backend.SerializeToString,
 80                response_deserializer=app_dot_marznode_dot_marznode__pb2.BackendStats.FromString,
 81                _registered_method=True)
 82
 83
 84class MarzServiceServicer(object):
 85    """Missing associated documentation comment in .proto file."""
 86
 87    def SyncUsers(self, request_iterator, context):
 88        """Missing associated documentation comment in .proto file."""
 89        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 90        context.set_details('Method not implemented!')
 91        raise NotImplementedError('Method not implemented!')
 92
 93    def RepopulateUsers(self, request, context):
 94        """Missing associated documentation comment in .proto file."""
 95        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 96        context.set_details('Method not implemented!')
 97        raise NotImplementedError('Method not implemented!')
 98
 99    def FetchBackends(self, request, context):
100        """Missing associated documentation comment in .proto file."""
101        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
102        context.set_details('Method not implemented!')
103        raise NotImplementedError('Method not implemented!')
104
105    def FetchUsersStats(self, request, context):
106        """Missing associated documentation comment in .proto file."""
107        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
108        context.set_details('Method not implemented!')
109        raise NotImplementedError('Method not implemented!')
110
111    def FetchBackendConfig(self, request, context):
112        """Missing associated documentation comment in .proto file."""
113        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
114        context.set_details('Method not implemented!')
115        raise NotImplementedError('Method not implemented!')
116
117    def RestartBackend(self, request, context):
118        """Missing associated documentation comment in .proto file."""
119        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
120        context.set_details('Method not implemented!')
121        raise NotImplementedError('Method not implemented!')
122
123    def StreamBackendLogs(self, request, context):
124        """Missing associated documentation comment in .proto file."""
125        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
126        context.set_details('Method not implemented!')
127        raise NotImplementedError('Method not implemented!')
128
129    def GetBackendStats(self, request, context):
130        """Missing associated documentation comment in .proto file."""
131        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
132        context.set_details('Method not implemented!')
133        raise NotImplementedError('Method not implemented!')
134
135
136def add_MarzServiceServicer_to_server(servicer, server):
137    rpc_method_handlers = {
138            'SyncUsers': grpc.stream_unary_rpc_method_handler(
139                    servicer.SyncUsers,
140                    request_deserializer=app_dot_marznode_dot_marznode__pb2.UserData.FromString,
141                    response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
142            ),
143            'RepopulateUsers': grpc.unary_unary_rpc_method_handler(
144                    servicer.RepopulateUsers,
145                    request_deserializer=app_dot_marznode_dot_marznode__pb2.UsersData.FromString,
146                    response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
147            ),
148            'FetchBackends': grpc.unary_unary_rpc_method_handler(
149                    servicer.FetchBackends,
150                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
151                    response_serializer=app_dot_marznode_dot_marznode__pb2.BackendsResponse.SerializeToString,
152            ),
153            'FetchUsersStats': grpc.unary_unary_rpc_method_handler(
154                    servicer.FetchUsersStats,
155                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
156                    response_serializer=app_dot_marznode_dot_marznode__pb2.UsersStats.SerializeToString,
157            ),
158            'FetchBackendConfig': grpc.unary_unary_rpc_method_handler(
159                    servicer.FetchBackendConfig,
160                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Backend.FromString,
161                    response_serializer=app_dot_marznode_dot_marznode__pb2.BackendConfig.SerializeToString,
162            ),
163            'RestartBackend': grpc.unary_unary_rpc_method_handler(
164                    servicer.RestartBackend,
165                    request_deserializer=app_dot_marznode_dot_marznode__pb2.RestartBackendRequest.FromString,
166                    response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
167            ),
168            'StreamBackendLogs': grpc.unary_stream_rpc_method_handler(
169                    servicer.StreamBackendLogs,
170                    request_deserializer=app_dot_marznode_dot_marznode__pb2.BackendLogsRequest.FromString,
171                    response_serializer=app_dot_marznode_dot_marznode__pb2.LogLine.SerializeToString,
172            ),
173            'GetBackendStats': grpc.unary_unary_rpc_method_handler(
174                    servicer.GetBackendStats,
175                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Backend.FromString,
176                    response_serializer=app_dot_marznode_dot_marznode__pb2.BackendStats.SerializeToString,
177            ),
178    }
179    generic_handler = grpc.method_handlers_generic_handler(
180            'marznode.MarzService', rpc_method_handlers)
181    server.add_generic_rpc_handlers((generic_handler,))
182    server.add_registered_method_handlers('marznode.MarzService', rpc_method_handlers)
183
184
185 # This class is part of an EXPERIMENTAL API.
186class MarzService(object):
187    """Missing associated documentation comment in .proto file."""
188
189    @staticmethod
190    def SyncUsers(request_iterator,
191            target,
192            options=(),
193            channel_credentials=None,
194            call_credentials=None,
195            insecure=False,
196            compression=None,
197            wait_for_ready=None,
198            timeout=None,
199            metadata=None):
200        return grpc.experimental.stream_unary(
201            request_iterator,
202            target,
203            '/marznode.MarzService/SyncUsers',
204            app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
205            app_dot_marznode_dot_marznode__pb2.Empty.FromString,
206            options,
207            channel_credentials,
208            insecure,
209            call_credentials,
210            compression,
211            wait_for_ready,
212            timeout,
213            metadata,
214            _registered_method=True)
215
216    @staticmethod
217    def RepopulateUsers(request,
218            target,
219            options=(),
220            channel_credentials=None,
221            call_credentials=None,
222            insecure=False,
223            compression=None,
224            wait_for_ready=None,
225            timeout=None,
226            metadata=None):
227        return grpc.experimental.unary_unary(
228            request,
229            target,
230            '/marznode.MarzService/RepopulateUsers',
231            app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
232            app_dot_marznode_dot_marznode__pb2.Empty.FromString,
233            options,
234            channel_credentials,
235            insecure,
236            call_credentials,
237            compression,
238            wait_for_ready,
239            timeout,
240            metadata,
241            _registered_method=True)
242
243    @staticmethod
244    def FetchBackends(request,
245            target,
246            options=(),
247            channel_credentials=None,
248            call_credentials=None,
249            insecure=False,
250            compression=None,
251            wait_for_ready=None,
252            timeout=None,
253            metadata=None):
254        return grpc.experimental.unary_unary(
255            request,
256            target,
257            '/marznode.MarzService/FetchBackends',
258            app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
259            app_dot_marznode_dot_marznode__pb2.BackendsResponse.FromString,
260            options,
261            channel_credentials,
262            insecure,
263            call_credentials,
264            compression,
265            wait_for_ready,
266            timeout,
267            metadata,
268            _registered_method=True)
269
270    @staticmethod
271    def FetchUsersStats(request,
272            target,
273            options=(),
274            channel_credentials=None,
275            call_credentials=None,
276            insecure=False,
277            compression=None,
278            wait_for_ready=None,
279            timeout=None,
280            metadata=None):
281        return grpc.experimental.unary_unary(
282            request,
283            target,
284            '/marznode.MarzService/FetchUsersStats',
285            app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
286            app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
287            options,
288            channel_credentials,
289            insecure,
290            call_credentials,
291            compression,
292            wait_for_ready,
293            timeout,
294            metadata,
295            _registered_method=True)
296
297    @staticmethod
298    def FetchBackendConfig(request,
299            target,
300            options=(),
301            channel_credentials=None,
302            call_credentials=None,
303            insecure=False,
304            compression=None,
305            wait_for_ready=None,
306            timeout=None,
307            metadata=None):
308        return grpc.experimental.unary_unary(
309            request,
310            target,
311            '/marznode.MarzService/FetchBackendConfig',
312            app_dot_marznode_dot_marznode__pb2.Backend.SerializeToString,
313            app_dot_marznode_dot_marznode__pb2.BackendConfig.FromString,
314            options,
315            channel_credentials,
316            insecure,
317            call_credentials,
318            compression,
319            wait_for_ready,
320            timeout,
321            metadata,
322            _registered_method=True)
323
324    @staticmethod
325    def RestartBackend(request,
326            target,
327            options=(),
328            channel_credentials=None,
329            call_credentials=None,
330            insecure=False,
331            compression=None,
332            wait_for_ready=None,
333            timeout=None,
334            metadata=None):
335        return grpc.experimental.unary_unary(
336            request,
337            target,
338            '/marznode.MarzService/RestartBackend',
339            app_dot_marznode_dot_marznode__pb2.RestartBackendRequest.SerializeToString,
340            app_dot_marznode_dot_marznode__pb2.Empty.FromString,
341            options,
342            channel_credentials,
343            insecure,
344            call_credentials,
345            compression,
346            wait_for_ready,
347            timeout,
348            metadata,
349            _registered_method=True)
350
351    @staticmethod
352    def StreamBackendLogs(request,
353            target,
354            options=(),
355            channel_credentials=None,
356            call_credentials=None,
357            insecure=False,
358            compression=None,
359            wait_for_ready=None,
360            timeout=None,
361            metadata=None):
362        return grpc.experimental.unary_stream(
363            request,
364            target,
365            '/marznode.MarzService/StreamBackendLogs',
366            app_dot_marznode_dot_marznode__pb2.BackendLogsRequest.SerializeToString,
367            app_dot_marznode_dot_marznode__pb2.LogLine.FromString,
368            options,
369            channel_credentials,
370            insecure,
371            call_credentials,
372            compression,
373            wait_for_ready,
374            timeout,
375            metadata,
376            _registered_method=True)
377
378    @staticmethod
379    def GetBackendStats(request,
380            target,
381            options=(),
382            channel_credentials=None,
383            call_credentials=None,
384            insecure=False,
385            compression=None,
386            wait_for_ready=None,
387            timeout=None,
388            metadata=None):
389        return grpc.experimental.unary_unary(
390            request,
391            target,
392            '/marznode.MarzService/GetBackendStats',
393            app_dot_marznode_dot_marznode__pb2.Backend.SerializeToString,
394            app_dot_marznode_dot_marznode__pb2.BackendStats.FromString,
395            options,
396            channel_credentials,
397            insecure,
398            call_credentials,
399            compression,
400            wait_for_ready,
401            timeout,
402            metadata,
403            _registered_method=True)