io.envoyproxy.envoy.service.ratelimit.v3.RateLimitServiceGrpc.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-scala-control-plane_2.13 Show documentation
Show all versions of envoy-scala-control-plane_2.13 Show documentation
ScalaPB generated bindings for Envoy
package io.envoyproxy.envoy.service.ratelimit.v3
object RateLimitServiceGrpc {
val METHOD_SHOULD_RATE_LIMIT: _root_.io.grpc.MethodDescriptor[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("envoy.service.ratelimit.v3.RateLimitService", "ShouldRateLimit"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
.build()
val SERVICE: _root_.io.grpc.ServiceDescriptor =
_root_.io.grpc.ServiceDescriptor.newBuilder("envoy.service.ratelimit.v3.RateLimitService")
.setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.javaDescriptor))
.addMethod(METHOD_SHOULD_RATE_LIMIT)
.build()
trait RateLimitService extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion = RateLimitService
/** Determine whether rate limiting should take place.
*/
def shouldRateLimit(request: io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest): scala.concurrent.Future[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse]
}
object RateLimitService extends _root_.scalapb.grpc.ServiceCompanion[RateLimitService] {
implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[RateLimitService] = this
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.javaDescriptor.getServices().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.scalaDescriptor.services(0)
def bindService(serviceImpl: RateLimitService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
_root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
.addMethod(
METHOD_SHOULD_RATE_LIMIT,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall(new _root_.io.grpc.stub.ServerCalls.UnaryMethod[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse] {
override def invoke(request: io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest, observer: _root_.io.grpc.stub.StreamObserver[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse]): _root_.scala.Unit =
serviceImpl.shouldRateLimit(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.build()
}
trait RateLimitServiceBlockingClient {
def serviceCompanion = RateLimitService
/** Determine whether rate limiting should take place.
*/
def shouldRateLimit(request: io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest): io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse
}
class RateLimitServiceBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[RateLimitServiceBlockingStub](channel, options) with RateLimitServiceBlockingClient {
/** Determine whether rate limiting should take place.
*/
override def shouldRateLimit(request: io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest): io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_SHOULD_RATE_LIMIT, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): RateLimitServiceBlockingStub = new RateLimitServiceBlockingStub(channel, options)
}
class RateLimitServiceStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[RateLimitServiceStub](channel, options) with RateLimitService {
/** Determine whether rate limiting should take place.
*/
override def shouldRateLimit(request: io.envoyproxy.envoy.service.ratelimit.v3.RateLimitRequest): scala.concurrent.Future[io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_SHOULD_RATE_LIMIT, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): RateLimitServiceStub = new RateLimitServiceStub(channel, options)
}
def bindService(serviceImpl: RateLimitService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = RateLimitService.bindService(serviceImpl, executionContext)
def blockingStub(channel: _root_.io.grpc.Channel): RateLimitServiceBlockingStub = new RateLimitServiceBlockingStub(channel)
def stub(channel: _root_.io.grpc.Channel): RateLimitServiceStub = new RateLimitServiceStub(channel)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.javaDescriptor.getServices().get(0)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy