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

com.github.xds.service.orca.v3.OpenRcaServiceGrpc.scala Maven / Gradle / Ivy

package com.github.xds.service.orca.v3

object OpenRcaServiceGrpc {
  val METHOD_STREAM_CORE_METRICS: _root_.io.grpc.MethodDescriptor[com.github.xds.service.orca.v3.OrcaLoadReportRequest, com.github.xds.data.orca.v3.OrcaLoadReport] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("xds.service.orca.v3.OpenRcaService", "StreamCoreMetrics"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.github.xds.service.orca.v3.OrcaLoadReportRequest])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.github.xds.data.orca.v3.OrcaLoadReport])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(com.github.xds.service.orca.v3.OrcaProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
      .build()
  
  val SERVICE: _root_.io.grpc.ServiceDescriptor =
    _root_.io.grpc.ServiceDescriptor.newBuilder("xds.service.orca.v3.OpenRcaService")
      .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(com.github.xds.service.orca.v3.OrcaProto.javaDescriptor))
      .addMethod(METHOD_STREAM_CORE_METRICS)
      .build()
  
  /** Out-of-band (OOB) load reporting service for the additional load reporting
    * agent that does not sit in the request path. Reports are periodically sampled
    * with sufficient frequency to provide temporal association with requests.
    * OOB reporting compensates the limitation of in-band reporting in revealing
    * costs for backends that do not provide a steady stream of telemetry such as
    * long running stream operations and zero QPS services. This is a server
    * streaming service, client needs to terminate current RPC and initiate
    * a new call to change backend reporting frequency.
    */
  trait OpenRcaService extends _root_.scalapb.grpc.AbstractService {
    override def serviceCompanion = OpenRcaService
    def streamCoreMetrics(request: com.github.xds.service.orca.v3.OrcaLoadReportRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[com.github.xds.data.orca.v3.OrcaLoadReport]): _root_.scala.Unit
  }
  
  object OpenRcaService extends _root_.scalapb.grpc.ServiceCompanion[OpenRcaService] {
    implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[OpenRcaService] = this
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = com.github.xds.service.orca.v3.OrcaProto.javaDescriptor.getServices().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = com.github.xds.service.orca.v3.OrcaProto.scalaDescriptor.services(0)
    def bindService(serviceImpl: OpenRcaService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
      _root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
      .addMethod(
        METHOD_STREAM_CORE_METRICS,
        _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall(new _root_.io.grpc.stub.ServerCalls.ServerStreamingMethod[com.github.xds.service.orca.v3.OrcaLoadReportRequest, com.github.xds.data.orca.v3.OrcaLoadReport] {
          override def invoke(request: com.github.xds.service.orca.v3.OrcaLoadReportRequest, observer: _root_.io.grpc.stub.StreamObserver[com.github.xds.data.orca.v3.OrcaLoadReport]): _root_.scala.Unit =
            serviceImpl.streamCoreMetrics(request, observer)
        }))
      .build()
  }
  
  /** Out-of-band (OOB) load reporting service for the additional load reporting
    * agent that does not sit in the request path. Reports are periodically sampled
    * with sufficient frequency to provide temporal association with requests.
    * OOB reporting compensates the limitation of in-band reporting in revealing
    * costs for backends that do not provide a steady stream of telemetry such as
    * long running stream operations and zero QPS services. This is a server
    * streaming service, client needs to terminate current RPC and initiate
    * a new call to change backend reporting frequency.
    */
  trait OpenRcaServiceBlockingClient {
    def serviceCompanion = OpenRcaService
    def streamCoreMetrics(request: com.github.xds.service.orca.v3.OrcaLoadReportRequest): scala.collection.Iterator[com.github.xds.data.orca.v3.OrcaLoadReport]
  }
  
  class OpenRcaServiceBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[OpenRcaServiceBlockingStub](channel, options) with OpenRcaServiceBlockingClient {
    override def streamCoreMetrics(request: com.github.xds.service.orca.v3.OrcaLoadReportRequest): scala.collection.Iterator[com.github.xds.data.orca.v3.OrcaLoadReport] = {
      _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_STREAM_CORE_METRICS, options, request)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): OpenRcaServiceBlockingStub = new OpenRcaServiceBlockingStub(channel, options)
  }
  
  class OpenRcaServiceStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[OpenRcaServiceStub](channel, options) with OpenRcaService {
    override def streamCoreMetrics(request: com.github.xds.service.orca.v3.OrcaLoadReportRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[com.github.xds.data.orca.v3.OrcaLoadReport]): _root_.scala.Unit = {
      _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_STREAM_CORE_METRICS, options, request, responseObserver)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): OpenRcaServiceStub = new OpenRcaServiceStub(channel, options)
  }
  
  def bindService(serviceImpl: OpenRcaService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = OpenRcaService.bindService(serviceImpl, executionContext)
  
  def blockingStub(channel: _root_.io.grpc.Channel): OpenRcaServiceBlockingStub = new OpenRcaServiceBlockingStub(channel)
  
  def stub(channel: _root_.io.grpc.Channel): OpenRcaServiceStub = new OpenRcaServiceStub(channel)
  
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = com.github.xds.service.orca.v3.OrcaProto.javaDescriptor.getServices().get(0)
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy