Coverage for /Users/ajo/work/jumpstarter/jumpstarter/packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/router_pb2_grpc.py: 79%
19 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-06 10:21 +0200
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-06 10:21 +0200
1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
5from . import router_pb2 as jumpstarter_dot_v1_dot_router__pb2
8class RouterServiceStub(object):
9 """StreamService
10 Claims:
11 iss: jumpstarter controller
12 aud: jumpstarter router
13 sub: jumpstarter client/exporter
14 stream: stream id
15 """
17 def __init__(self, channel):
18 """Constructor.
20 Args:
21 channel: A grpc.Channel.
22 """
23 self.Stream = channel.stream_stream(
24 '/jumpstarter.v1.RouterService/Stream',
25 request_serializer=jumpstarter_dot_v1_dot_router__pb2.StreamRequest.SerializeToString,
26 response_deserializer=jumpstarter_dot_v1_dot_router__pb2.StreamResponse.FromString,
27 _registered_method=True)
30class RouterServiceServicer(object):
31 """StreamService
32 Claims:
33 iss: jumpstarter controller
34 aud: jumpstarter router
35 sub: jumpstarter client/exporter
36 stream: stream id
37 """
39 def Stream(self, request_iterator, context):
40 """Stream connects caller to another caller of the same stream
41 """
42 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43 context.set_details('Method not implemented!')
44 raise NotImplementedError('Method not implemented!')
47def add_RouterServiceServicer_to_server(servicer, server):
48 rpc_method_handlers = {
49 'Stream': grpc.stream_stream_rpc_method_handler(
50 servicer.Stream,
51 request_deserializer=jumpstarter_dot_v1_dot_router__pb2.StreamRequest.FromString,
52 response_serializer=jumpstarter_dot_v1_dot_router__pb2.StreamResponse.SerializeToString,
53 ),
54 }
55 generic_handler = grpc.method_handlers_generic_handler(
56 'jumpstarter.v1.RouterService', rpc_method_handlers)
57 server.add_generic_rpc_handlers((generic_handler,))
58 server.add_registered_method_handlers('jumpstarter.v1.RouterService', rpc_method_handlers)
61 # This class is part of an EXPERIMENTAL API.
62class RouterService(object):
63 """StreamService
64 Claims:
65 iss: jumpstarter controller
66 aud: jumpstarter router
67 sub: jumpstarter client/exporter
68 stream: stream id
69 """
71 @staticmethod
72 def Stream(request_iterator,
73 target,
74 options=(),
75 channel_credentials=None,
76 call_credentials=None,
77 insecure=False,
78 compression=None,
79 wait_for_ready=None,
80 timeout=None,
81 metadata=None):
82 return grpc.experimental.stream_stream(
83 request_iterator,
84 target,
85 '/jumpstarter.v1.RouterService/Stream',
86 jumpstarter_dot_v1_dot_router__pb2.StreamRequest.SerializeToString,
87 jumpstarter_dot_v1_dot_router__pb2.StreamResponse.FromString,
88 options,
89 channel_credentials,
90 insecure,
91 call_credentials,
92 compression,
93 wait_for_ready,
94 timeout,
95 metadata,
96 _registered_method=True)