All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitServiceGrpc Maven / Gradle / Ivy
package io.envoyproxy.envoy.service.ratelimit.v2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.48.1)",
comments = "Source: envoy/service/ratelimit/v2/rls.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RateLimitServiceGrpc {
private RateLimitServiceGrpc() {}
public static final String SERVICE_NAME = "envoy.service.ratelimit.v2.RateLimitService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getShouldRateLimitMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ShouldRateLimit",
requestType = io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.class,
responseType = io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getShouldRateLimitMethod() {
io.grpc.MethodDescriptor getShouldRateLimitMethod;
if ((getShouldRateLimitMethod = RateLimitServiceGrpc.getShouldRateLimitMethod) == null) {
synchronized (RateLimitServiceGrpc.class) {
if ((getShouldRateLimitMethod = RateLimitServiceGrpc.getShouldRateLimitMethod) == null) {
RateLimitServiceGrpc.getShouldRateLimitMethod = getShouldRateLimitMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ShouldRateLimit"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.getDefaultInstance()))
.setSchemaDescriptor(new RateLimitServiceMethodDescriptorSupplier("ShouldRateLimit"))
.build();
}
}
}
return getShouldRateLimitMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static RateLimitServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceStub(channel, callOptions);
}
};
return RateLimitServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static RateLimitServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceBlockingStub(channel, callOptions);
}
};
return RateLimitServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static RateLimitServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceFutureStub(channel, callOptions);
}
};
return RateLimitServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class RateLimitServiceImplBase implements io.grpc.BindableService {
/**
*
* Determine whether rate limiting should take place.
*
*/
public void shouldRateLimit(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getShouldRateLimitMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getShouldRateLimitMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest,
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse>(
this, METHODID_SHOULD_RATE_LIMIT)))
.build();
}
}
/**
*/
public static final class RateLimitServiceStub extends io.grpc.stub.AbstractAsyncStub {
private RateLimitServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceStub(channel, callOptions);
}
/**
*
* Determine whether rate limiting should take place.
*
*/
public void shouldRateLimit(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getShouldRateLimitMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class RateLimitServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private RateLimitServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceBlockingStub(channel, callOptions);
}
/**
*
* Determine whether rate limiting should take place.
*
*/
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse shouldRateLimit(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getShouldRateLimitMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class RateLimitServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private RateLimitServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitServiceFutureStub(channel, callOptions);
}
/**
*
* Determine whether rate limiting should take place.
*
*/
public com.google.common.util.concurrent.ListenableFuture shouldRateLimit(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getShouldRateLimitMethod(), getCallOptions()), request);
}
}
private static final int METHODID_SHOULD_RATE_LIMIT = 0;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final RateLimitServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(RateLimitServiceImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_SHOULD_RATE_LIMIT:
serviceImpl.shouldRateLimit((io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class RateLimitServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
RateLimitServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("RateLimitService");
}
}
private static final class RateLimitServiceFileDescriptorSupplier
extends RateLimitServiceBaseDescriptorSupplier {
RateLimitServiceFileDescriptorSupplier() {}
}
private static final class RateLimitServiceMethodDescriptorSupplier
extends RateLimitServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
RateLimitServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (RateLimitServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new RateLimitServiceFileDescriptorSupplier())
.addMethod(getShouldRateLimitMethod())
.build();
}
}
}
return result;
}
}