trace_service_pb2_grpc.py
Go to the documentation of this file.
1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 import grpc
3 
4 from opencensus.proto.agent.trace.v1 import trace_service_pb2 as opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2
5 
6 
7 class TraceServiceStub(object):
8  """Service that can be used to push spans and configs between one Application
9  instrumented with OpenCensus and an agent, or between an agent and a
10  central collector or config service (in this case spans and configs are
11  sent/received to/from multiple Applications).
12  """
13 
14  def __init__(self, channel):
15  """Constructor.
16 
17  Args:
18  channel: A grpc.Channel.
19  """
20  self.Config = channel.stream_stream(
21  '/opencensus.proto.agent.trace.v1.TraceService/Config',
22  request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.SerializeToString,
23  response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.FromString,
24  )
25  self.Export = channel.stream_stream(
26  '/opencensus.proto.agent.trace.v1.TraceService/Export',
27  request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.SerializeToString,
28  response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.FromString,
29  )
30 
31 
32 class TraceServiceServicer(object):
33  """Service that can be used to push spans and configs between one Application
34  instrumented with OpenCensus and an agent, or between an agent and a
35  central collector or config service (in this case spans and configs are
36  sent/received to/from multiple Applications).
37  """
38 
39  def Config(self, request_iterator, context):
40  """After initialization, this RPC must be kept alive for the entire life of
41  the application. The agent pushes configs down to applications via a
42  stream.
43  """
44  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
45  context.set_details('Method not implemented!')
46  raise NotImplementedError('Method not implemented!')
47 
48  def Export(self, request_iterator, context):
49  """For performance reasons, it is recommended to keep this RPC
50  alive for the entire life of the application.
51  """
52  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53  context.set_details('Method not implemented!')
54  raise NotImplementedError('Method not implemented!')
55 
56 
57 def add_TraceServiceServicer_to_server(servicer, server):
58  rpc_method_handlers = {
60  servicer.Config,
61  request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.FromString,
62  response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.SerializeToString,
63  ),
65  servicer.Export,
66  request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.FromString,
67  response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.SerializeToString,
68  ),
69  }
70  generic_handler = grpc.method_handlers_generic_handler(
71  'opencensus.proto.agent.trace.v1.TraceService', rpc_method_handlers)
72  server.add_generic_rpc_handlers((generic_handler,))
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceServicer.Config
def Config(self, request_iterator, context)
Definition: trace_service_pb2_grpc.py:39
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceStub.Config
Config
Definition: trace_service_pb2_grpc.py:20
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceStub
Definition: trace_service_pb2_grpc.py:7
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceStub.__init__
def __init__(self, channel)
Definition: trace_service_pb2_grpc.py:14
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceStub.Export
Export
Definition: trace_service_pb2_grpc.py:25
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceServicer
Definition: trace_service_pb2_grpc.py:32
grpc.method_handlers_generic_handler
def method_handlers_generic_handler(service, method_handlers)
Definition: src/python/grpcio/grpc/__init__.py:1590
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.TraceServiceServicer.Export
def Export(self, request_iterator, context)
Definition: trace_service_pb2_grpc.py:48
opencensus.proto.agent.trace.v1.trace_service_pb2_grpc.add_TraceServiceServicer_to_server
def add_TraceServiceServicer_to_server(servicer, server)
Definition: trace_service_pb2_grpc.py:57
grpc.stream_stream_rpc_method_handler
def stream_stream_rpc_method_handler(behavior, request_deserializer=None, response_serializer=None)
Definition: src/python/grpcio/grpc/__init__.py:1570
opencensus.proto.agent.trace.v1
Definition: third_party/opencensus-proto/gen-python/opencensus/proto/agent/trace/v1/__init__.py:1


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:40