
io.envoyproxy.envoy.service.cluster.v3.ClusterDiscoveryServiceGrpc Maven / Gradle / Ivy
package io.envoyproxy.envoy.service.cluster.v3;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*
* Return list of all clusters this proxy will load balance to.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.22.1)",
comments = "Source: envoy/service/cluster/v3/cds.proto")
public final class ClusterDiscoveryServiceGrpc {
private ClusterDiscoveryServiceGrpc() {}
public static final String SERVICE_NAME = "envoy.service.cluster.v3.ClusterDiscoveryService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getStreamClustersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamClusters",
requestType = io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest.class,
responseType = io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getStreamClustersMethod() {
io.grpc.MethodDescriptor getStreamClustersMethod;
if ((getStreamClustersMethod = ClusterDiscoveryServiceGrpc.getStreamClustersMethod) == null) {
synchronized (ClusterDiscoveryServiceGrpc.class) {
if ((getStreamClustersMethod = ClusterDiscoveryServiceGrpc.getStreamClustersMethod) == null) {
ClusterDiscoveryServiceGrpc.getStreamClustersMethod = getStreamClustersMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"envoy.service.cluster.v3.ClusterDiscoveryService", "StreamClusters"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterDiscoveryServiceMethodDescriptorSupplier("StreamClusters"))
.build();
}
}
}
return getStreamClustersMethod;
}
private static volatile io.grpc.MethodDescriptor getDeltaClustersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeltaClusters",
requestType = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.class,
responseType = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getDeltaClustersMethod() {
io.grpc.MethodDescriptor getDeltaClustersMethod;
if ((getDeltaClustersMethod = ClusterDiscoveryServiceGrpc.getDeltaClustersMethod) == null) {
synchronized (ClusterDiscoveryServiceGrpc.class) {
if ((getDeltaClustersMethod = ClusterDiscoveryServiceGrpc.getDeltaClustersMethod) == null) {
ClusterDiscoveryServiceGrpc.getDeltaClustersMethod = getDeltaClustersMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"envoy.service.cluster.v3.ClusterDiscoveryService", "DeltaClusters"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterDiscoveryServiceMethodDescriptorSupplier("DeltaClusters"))
.build();
}
}
}
return getDeltaClustersMethod;
}
private static volatile io.grpc.MethodDescriptor getFetchClustersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "FetchClusters",
requestType = io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest.class,
responseType = io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getFetchClustersMethod() {
io.grpc.MethodDescriptor getFetchClustersMethod;
if ((getFetchClustersMethod = ClusterDiscoveryServiceGrpc.getFetchClustersMethod) == null) {
synchronized (ClusterDiscoveryServiceGrpc.class) {
if ((getFetchClustersMethod = ClusterDiscoveryServiceGrpc.getFetchClustersMethod) == null) {
ClusterDiscoveryServiceGrpc.getFetchClustersMethod = getFetchClustersMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"envoy.service.cluster.v3.ClusterDiscoveryService", "FetchClusters"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterDiscoveryServiceMethodDescriptorSupplier("FetchClusters"))
.build();
}
}
}
return getFetchClustersMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ClusterDiscoveryServiceStub newStub(io.grpc.Channel channel) {
return new ClusterDiscoveryServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ClusterDiscoveryServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new ClusterDiscoveryServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ClusterDiscoveryServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new ClusterDiscoveryServiceFutureStub(channel);
}
/**
*
* Return list of all clusters this proxy will load balance to.
*
*/
public static abstract class ClusterDiscoveryServiceImplBase implements io.grpc.BindableService {
/**
*/
public io.grpc.stub.StreamObserver streamClusters(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getStreamClustersMethod(), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver deltaClusters(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getDeltaClustersMethod(), responseObserver);
}
/**
*/
public void fetchClusters(io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getFetchClustersMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getStreamClustersMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest,
io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse>(
this, METHODID_STREAM_CLUSTERS)))
.addMethod(
getDeltaClustersMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest,
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryResponse>(
this, METHODID_DELTA_CLUSTERS)))
.addMethod(
getFetchClustersMethod(),
asyncUnaryCall(
new MethodHandlers<
io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest,
io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse>(
this, METHODID_FETCH_CLUSTERS)))
.build();
}
}
/**
*
* Return list of all clusters this proxy will load balance to.
*
*/
public static final class ClusterDiscoveryServiceStub extends io.grpc.stub.AbstractStub {
private ClusterDiscoveryServiceStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterDiscoveryServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterDiscoveryServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterDiscoveryServiceStub(channel, callOptions);
}
/**
*/
public io.grpc.stub.StreamObserver streamClusters(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getStreamClustersMethod(), getCallOptions()), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver deltaClusters(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getDeltaClustersMethod(), getCallOptions()), responseObserver);
}
/**
*/
public void fetchClusters(io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getFetchClustersMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Return list of all clusters this proxy will load balance to.
*
*/
public static final class ClusterDiscoveryServiceBlockingStub extends io.grpc.stub.AbstractStub {
private ClusterDiscoveryServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterDiscoveryServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterDiscoveryServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterDiscoveryServiceBlockingStub(channel, callOptions);
}
/**
*/
public io.envoyproxy.envoy.service.discovery.v3.DiscoveryResponse fetchClusters(io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest request) {
return blockingUnaryCall(
getChannel(), getFetchClustersMethod(), getCallOptions(), request);
}
}
/**
*
* Return list of all clusters this proxy will load balance to.
*
*/
public static final class ClusterDiscoveryServiceFutureStub extends io.grpc.stub.AbstractStub {
private ClusterDiscoveryServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterDiscoveryServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterDiscoveryServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterDiscoveryServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture fetchClusters(
io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest request) {
return futureUnaryCall(
getChannel().newCall(getFetchClustersMethod(), getCallOptions()), request);
}
}
private static final int METHODID_FETCH_CLUSTERS = 0;
private static final int METHODID_STREAM_CLUSTERS = 1;
private static final int METHODID_DELTA_CLUSTERS = 2;
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 ClusterDiscoveryServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(ClusterDiscoveryServiceImplBase 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_FETCH_CLUSTERS:
serviceImpl.fetchClusters((io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest) 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) {
case METHODID_STREAM_CLUSTERS:
return (io.grpc.stub.StreamObserver) serviceImpl.streamClusters(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_DELTA_CLUSTERS:
return (io.grpc.stub.StreamObserver) serviceImpl.deltaClusters(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class ClusterDiscoveryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ClusterDiscoveryServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.envoyproxy.envoy.service.cluster.v3.CdsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ClusterDiscoveryService");
}
}
private static final class ClusterDiscoveryServiceFileDescriptorSupplier
extends ClusterDiscoveryServiceBaseDescriptorSupplier {
ClusterDiscoveryServiceFileDescriptorSupplier() {}
}
private static final class ClusterDiscoveryServiceMethodDescriptorSupplier
extends ClusterDiscoveryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ClusterDiscoveryServiceMethodDescriptorSupplier(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 (ClusterDiscoveryServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ClusterDiscoveryServiceFileDescriptorSupplier())
.addMethod(getStreamClustersMethod())
.addMethod(getDeltaClustersMethod())
.addMethod(getFetchClustersMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy