xref: /aosp_15_r20/external/perfetto/python/perfetto/bigtrace/protos/perfetto/bigtrace/orchestrator_pb2_grpc.py (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
4
5from perfetto.bigtrace.protos.perfetto.bigtrace import orchestrator_pb2 as protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
6
7
8class BigtraceOrchestratorStub(object):
9  """gRPC Interface for a Bigtrace Orchestrator
10
11    Each Bigtrace instance has an orchestrator which is responsible for receiving
12    requests from the client and loading and querying traces by sharding them
13    across a set of "Workers"
14    """
15
16  def __init__(self, channel):
17    """Constructor.
18
19        Args:
20            channel: A grpc.Channel.
21        """
22    self.Query = channel.unary_stream(
23        '/perfetto.protos.BigtraceOrchestrator/Query',
24        request_serializer=protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
25        .BigtraceQueryArgs.SerializeToString,
26        response_deserializer=protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
27        .BigtraceQueryResponse.FromString,
28    )
29
30
31class BigtraceOrchestratorServicer(object):
32  """gRPC Interface for a Bigtrace Orchestrator
33
34    Each Bigtrace instance has an orchestrator which is responsible for receiving
35    requests from the client and loading and querying traces by sharding them
36    across a set of "Workers"
37    """
38
39  def Query(self, request, context):
40    """Executes a SQL query on the specified list of traces and returns a stream
41        of the result of the query for a given trace
42        """
43    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
44    context.set_details('Method not implemented!')
45    raise NotImplementedError('Method not implemented!')
46
47
48def add_BigtraceOrchestratorServicer_to_server(servicer, server):
49  rpc_method_handlers = {
50      'Query':
51          grpc.unary_stream_rpc_method_handler(
52              servicer.Query,
53              request_deserializer=protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
54              .BigtraceQueryArgs.FromString,
55              response_serializer=protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
56              .BigtraceQueryResponse.SerializeToString,
57          ),
58  }
59  generic_handler = grpc.method_handlers_generic_handler(
60      'perfetto.protos.BigtraceOrchestrator', rpc_method_handlers)
61  server.add_generic_rpc_handlers((generic_handler,))
62
63
64# This class is part of an EXPERIMENTAL API.
65class BigtraceOrchestrator(object):
66  """gRPC Interface for a Bigtrace Orchestrator
67
68    Each Bigtrace instance has an orchestrator which is responsible for receiving
69    requests from the client and loading and querying traces by sharding them
70    across a set of "Workers"
71    """
72
73  @staticmethod
74  def Query(request,
75            target,
76            options=(),
77            channel_credentials=None,
78            call_credentials=None,
79            insecure=False,
80            compression=None,
81            wait_for_ready=None,
82            timeout=None,
83            metadata=None):
84    return grpc.experimental.unary_stream(
85        request, target, '/perfetto.protos.BigtraceOrchestrator/Query',
86        protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2.BigtraceQueryArgs
87        .SerializeToString,
88        protos_dot_perfetto_dot_bigtrace_dot_orchestrator__pb2
89        .BigtraceQueryResponse.FromString, options, channel_credentials,
90        insecure, call_credentials, compression, wait_for_ready, timeout,
91        metadata)
92