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.
* Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
* data model as a standard to represent metrics information.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.45.1)",
comments = "Source: envoy/service/metrics/v2/metrics_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class MetricsServiceGrpc {
private MetricsServiceGrpc() {}
public static final String SERVICE_NAME = "envoy.service.metrics.v2.MetricsService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getStreamMetricsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamMetrics",
requestType = io.envoyproxy.envoy.service.metrics.v2.StreamMetricsMessage.class,
responseType = io.envoyproxy.envoy.service.metrics.v2.StreamMetricsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
public static io.grpc.MethodDescriptor getStreamMetricsMethod() {
io.grpc.MethodDescriptor getStreamMetricsMethod;
if ((getStreamMetricsMethod = MetricsServiceGrpc.getStreamMetricsMethod) == null) {
synchronized (MetricsServiceGrpc.class) {
if ((getStreamMetricsMethod = MetricsServiceGrpc.getStreamMetricsMethod) == null) {
MetricsServiceGrpc.getStreamMetricsMethod = getStreamMetricsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamMetrics"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.metrics.v2.StreamMetricsMessage.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.metrics.v2.StreamMetricsResponse.getDefaultInstance()))
.setSchemaDescriptor(new MetricsServiceMethodDescriptorSupplier("StreamMetrics"))
.build();
}
}
}
return getStreamMetricsMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MetricsServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MetricsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceStub(channel, callOptions);
}
};
return MetricsServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MetricsServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MetricsServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceBlockingStub(channel, callOptions);
}
};
return MetricsServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MetricsServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MetricsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceFutureStub(channel, callOptions);
}
};
return MetricsServiceFutureStub.newStub(factory, channel);
}
/**
*
* Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
* data model as a standard to represent metrics information.
*
*/
public static abstract class MetricsServiceImplBase implements io.grpc.BindableService {
/**
*
* Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
* response to be sent as nothing would be done in the case of failure.
*
*/
public io.grpc.stub.StreamObserver streamMetrics(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamMetricsMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getStreamMetricsMethod(),
io.grpc.stub.ServerCalls.asyncClientStreamingCall(
new MethodHandlers<
io.envoyproxy.envoy.service.metrics.v2.StreamMetricsMessage,
io.envoyproxy.envoy.service.metrics.v2.StreamMetricsResponse>(
this, METHODID_STREAM_METRICS)))
.build();
}
}
/**
*
* Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
* data model as a standard to represent metrics information.
*
*/
public static final class MetricsServiceStub extends io.grpc.stub.AbstractAsyncStub {
private MetricsServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MetricsServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceStub(channel, callOptions);
}
/**
*
* Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
* response to be sent as nothing would be done in the case of failure.
*
* Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
* data model as a standard to represent metrics information.
*
*/
public static final class MetricsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private MetricsServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MetricsServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceBlockingStub(channel, callOptions);
}
}
/**
*
* Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
* data model as a standard to represent metrics information.
*
*/
public static final class MetricsServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private MetricsServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MetricsServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MetricsServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_STREAM_METRICS = 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 MetricsServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(MetricsServiceImplBase 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) {
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_METRICS:
return (io.grpc.stub.StreamObserver) serviceImpl.streamMetrics(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class MetricsServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MetricsServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.envoyproxy.envoy.service.metrics.v2.MetricsServiceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("MetricsService");
}
}
private static final class MetricsServiceFileDescriptorSupplier
extends MetricsServiceBaseDescriptorSupplier {
MetricsServiceFileDescriptorSupplier() {}
}
private static final class MetricsServiceMethodDescriptorSupplier
extends MetricsServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
MetricsServiceMethodDescriptorSupplier(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 (MetricsServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MetricsServiceFileDescriptorSupplier())
.addMethod(getStreamMetricsMethod())
.build();
}
}
}
return result;
}
}