All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opencensus.proto.agent.trace.v1.TraceServiceGrpc.scala Maven / Gradle / Ivy

package io.opencensus.proto.agent.trace.v1

object TraceServiceGrpc {
  val METHOD_CONFIG: _root_.io.grpc.MethodDescriptor[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig, io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("opencensus.proto.agent.trace.v1.TraceService", "Config"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(io.opencensus.proto.agent.trace.v1.TraceServiceProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
      .build()
  
  val METHOD_EXPORT: _root_.io.grpc.MethodDescriptor[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest, io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("opencensus.proto.agent.trace.v1.TraceService", "Export"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(io.opencensus.proto.agent.trace.v1.TraceServiceProto.javaDescriptor.getServices().get(0).getMethods().get(1)))
      .build()
  
  val SERVICE: _root_.io.grpc.ServiceDescriptor =
    _root_.io.grpc.ServiceDescriptor.newBuilder("opencensus.proto.agent.trace.v1.TraceService")
      .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(io.opencensus.proto.agent.trace.v1.TraceServiceProto.javaDescriptor))
      .addMethod(METHOD_CONFIG)
      .addMethod(METHOD_EXPORT)
      .build()
  
  /** Service that can be used to push spans and configs between one Application
    * instrumented with OpenCensus and an agent, or between an agent and a
    * central collector or config service (in this case spans and configs are
    * sent/received to/from multiple Applications).
    */
  trait TraceService extends _root_.scalapb.grpc.AbstractService {
    override def serviceCompanion = TraceService
    /** After initialization, this RPC must be kept alive for the entire life of
      * the application. The agent pushes configs down to applications via a
      * stream.
      */
    def config(responseObserver: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig]
    /** For performance reasons, it is recommended to keep this RPC
      * alive for the entire life of the application.
      */
    def `export`(responseObserver: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest]
  }
  
  object TraceService extends _root_.scalapb.grpc.ServiceCompanion[TraceService] {
    implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[TraceService] = this
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = io.opencensus.proto.agent.trace.v1.TraceServiceProto.javaDescriptor.getServices().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = io.opencensus.proto.agent.trace.v1.TraceServiceProto.scalaDescriptor.services(0)
    def bindService(serviceImpl: TraceService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
      _root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
      .addMethod(
        METHOD_CONFIG,
        _root_.io.grpc.stub.ServerCalls.asyncBidiStreamingCall(new _root_.io.grpc.stub.ServerCalls.BidiStreamingMethod[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig, io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig] {
          override def invoke(observer: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig] =
            serviceImpl.config(observer)
        }))
      .addMethod(
        METHOD_EXPORT,
        _root_.io.grpc.stub.ServerCalls.asyncBidiStreamingCall(new _root_.io.grpc.stub.ServerCalls.BidiStreamingMethod[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest, io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse] {
          override def invoke(observer: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest] =
            serviceImpl.`export`(observer)
        }))
      .build()
  }
  
  /** Service that can be used to push spans and configs between one Application
    * instrumented with OpenCensus and an agent, or between an agent and a
    * central collector or config service (in this case spans and configs are
    * sent/received to/from multiple Applications).
    */
  trait TraceServiceBlockingClient {
    def serviceCompanion = TraceService
  }
  
  class TraceServiceBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[TraceServiceBlockingStub](channel, options) with TraceServiceBlockingClient {
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): TraceServiceBlockingStub = new TraceServiceBlockingStub(channel, options)
  }
  
  class TraceServiceStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[TraceServiceStub](channel, options) with TraceService {
    /** After initialization, this RPC must be kept alive for the entire life of
      * the application. The agent pushes configs down to applications via a
      * stream.
      */
    override def config(responseObserver: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.UpdatedLibraryConfig]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.CurrentLibraryConfig] = {
      _root_.scalapb.grpc.ClientCalls.asyncBidiStreamingCall(channel, METHOD_CONFIG, options, responseObserver)
    }
    
    /** For performance reasons, it is recommended to keep this RPC
      * alive for the entire life of the application.
      */
    override def `export`(responseObserver: _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceResponse]): _root_.io.grpc.stub.StreamObserver[io.opencensus.proto.agent.trace.v1.ExportTraceServiceRequest] = {
      _root_.scalapb.grpc.ClientCalls.asyncBidiStreamingCall(channel, METHOD_EXPORT, options, responseObserver)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): TraceServiceStub = new TraceServiceStub(channel, options)
  }
  
  def bindService(serviceImpl: TraceService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = TraceService.bindService(serviceImpl, executionContext)
  
  def blockingStub(channel: _root_.io.grpc.Channel): TraceServiceBlockingStub = new TraceServiceBlockingStub(channel)
  
  def stub(channel: _root_.io.grpc.Channel): TraceServiceStub = new TraceServiceStub(channel)
  
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = io.opencensus.proto.agent.trace.v1.TraceServiceProto.javaDescriptor.getServices().get(0)
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy