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.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/discovery/v2/hds.proto
package io.envoyproxy.envoy.service.discovery.v2;
/**
*
* [#proto-status: experimental]
* HDS is Health Discovery Service. It compliments Envoy’s health checking
* service by designating this Envoy to be a healthchecker for a subset of hosts
* in the cluster. The status of these health checks will be reported to the
* management server, where it can be aggregated etc and redistributed back to
* Envoy through EDS.
*
*
* Protobuf service {@code envoy.service.discovery.v2.HealthDiscoveryService}
*/
public abstract class HealthDiscoveryService
implements com.google.protobuf.Service {
protected HealthDiscoveryService() {}
public interface Interface {
/**
*
* 1. Envoy starts up and if its can_healthcheck option in the static
* bootstrap config is enabled, sends HealthCheckRequest to the management
* server. It supplies its capabilities (which protocol it can health check
* with, what zone it resides in, etc.).
* 2. In response to (1), the management server designates this Envoy as a
* healthchecker to health check a subset of all upstream hosts for a given
* cluster (for example upstream Host 1 and Host 2). It streams
* HealthCheckSpecifier messages with cluster related configuration for all
* clusters this Envoy is designated to health check. Subsequent
* HealthCheckSpecifier message will be sent on changes to:
* a. Endpoints to health checks
* b. Per cluster configuration change
* 3. Envoy creates a health probe based on the HealthCheck config and sends
* it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck
* configuration Envoy waits upon the arrival of the probe response and
* looks at the content of the response to decide whether the endpoint is
* healthy or not. If a response hasn't been received within the timeout
* interval, the endpoint health status is considered TIMEOUT.
* 4. Envoy reports results back in an EndpointHealthResponse message.
* Envoy streams responses as often as the interval configured by the
* management server in HealthCheckSpecifier.
* 5. The management Server collects health statuses for all endpoints in the
* cluster (for all clusters) and uses this information to construct
* EndpointDiscoveryResponse messages.
* 6. Once Envoy has a list of upstream endpoints to send traffic to, it load
* balances traffic to them without additional health checking. It may
* use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection
* failed to a particular endpoint to account for health status propagation
* delay between HDS and EDS).
* By default, can_healthcheck is true. If can_healthcheck is false, Cluster
* configuration may not contain HealthCheck message.
* TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above
* invariant?
* TODO(htuch): Add @amb67's diagram.
*
* TODO(htuch): Unlike the gRPC version, there is no stream-based binding of
* request/response. Should we add an identifier to the HealthCheckSpecifier
* to bind with the response?
*
*
* rpc FetchHealthCheck(.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse) returns (.envoy.service.discovery.v2.HealthCheckSpecifier) { ... }
*/
public abstract void fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done);
}
public static com.google.protobuf.Service newReflectiveService(
final Interface impl) {
return new HealthDiscoveryService() {
@java.lang.Override
public void streamHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done) {
impl.streamHealthCheck(controller, request, done);
}
@java.lang.Override
public void fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done) {
impl.fetchHealthCheck(controller, request, done);
}
};
}
public static com.google.protobuf.BlockingService
newReflectiveBlockingService(final BlockingInterface impl) {
return new com.google.protobuf.BlockingService() {
public final com.google.protobuf.Descriptors.ServiceDescriptor
getDescriptorForType() {
return getDescriptor();
}
public final com.google.protobuf.Message callBlockingMethod(
com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.RpcController controller,
com.google.protobuf.Message request)
throws com.google.protobuf.ServiceException {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.callBlockingMethod() given method descriptor for " +
"wrong service type.");
}
switch(method.getIndex()) {
case 0:
return impl.streamHealthCheck(controller, (io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse)request);
case 1:
return impl.fetchHealthCheck(controller, (io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse)request);
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
public final com.google.protobuf.Message
getRequestPrototype(
com.google.protobuf.Descriptors.MethodDescriptor method) {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.getRequestPrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.getIndex()) {
case 0:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.getDefaultInstance();
case 1:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
public final com.google.protobuf.Message
getResponsePrototype(
com.google.protobuf.Descriptors.MethodDescriptor method) {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.getResponsePrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.getIndex()) {
case 0:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance();
case 1:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
};
}
/**
*
* 1. Envoy starts up and if its can_healthcheck option in the static
* bootstrap config is enabled, sends HealthCheckRequest to the management
* server. It supplies its capabilities (which protocol it can health check
* with, what zone it resides in, etc.).
* 2. In response to (1), the management server designates this Envoy as a
* healthchecker to health check a subset of all upstream hosts for a given
* cluster (for example upstream Host 1 and Host 2). It streams
* HealthCheckSpecifier messages with cluster related configuration for all
* clusters this Envoy is designated to health check. Subsequent
* HealthCheckSpecifier message will be sent on changes to:
* a. Endpoints to health checks
* b. Per cluster configuration change
* 3. Envoy creates a health probe based on the HealthCheck config and sends
* it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck
* configuration Envoy waits upon the arrival of the probe response and
* looks at the content of the response to decide whether the endpoint is
* healthy or not. If a response hasn't been received within the timeout
* interval, the endpoint health status is considered TIMEOUT.
* 4. Envoy reports results back in an EndpointHealthResponse message.
* Envoy streams responses as often as the interval configured by the
* management server in HealthCheckSpecifier.
* 5. The management Server collects health statuses for all endpoints in the
* cluster (for all clusters) and uses this information to construct
* EndpointDiscoveryResponse messages.
* 6. Once Envoy has a list of upstream endpoints to send traffic to, it load
* balances traffic to them without additional health checking. It may
* use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection
* failed to a particular endpoint to account for health status propagation
* delay between HDS and EDS).
* By default, can_healthcheck is true. If can_healthcheck is false, Cluster
* configuration may not contain HealthCheck message.
* TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above
* invariant?
* TODO(htuch): Add @amb67's diagram.
*
* TODO(htuch): Unlike the gRPC version, there is no stream-based binding of
* request/response. Should we add an identifier to the HealthCheckSpecifier
* to bind with the response?
*
*
* rpc FetchHealthCheck(.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse) returns (.envoy.service.discovery.v2.HealthCheckSpecifier) { ... }
*/
public abstract void fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done);
public static final
com.google.protobuf.Descriptors.ServiceDescriptor
getDescriptor() {
return io.envoyproxy.envoy.service.discovery.v2.HdsProto.getDescriptor().getServices().get(0);
}
public final com.google.protobuf.Descriptors.ServiceDescriptor
getDescriptorForType() {
return getDescriptor();
}
public final void callMethod(
com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.RpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.RpcCallback<
com.google.protobuf.Message> done) {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.callMethod() given method descriptor for wrong " +
"service type.");
}
switch(method.getIndex()) {
case 0:
this.streamHealthCheck(controller, (io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 1:
this.fetchHealthCheck(controller, (io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
public final com.google.protobuf.Message
getRequestPrototype(
com.google.protobuf.Descriptors.MethodDescriptor method) {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.getRequestPrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.getIndex()) {
case 0:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.getDefaultInstance();
case 1:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
public final com.google.protobuf.Message
getResponsePrototype(
com.google.protobuf.Descriptors.MethodDescriptor method) {
if (method.getService() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"Service.getResponsePrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.getIndex()) {
case 0:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance();
case 1:
return io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
public static Stub newStub(
com.google.protobuf.RpcChannel channel) {
return new Stub(channel);
}
public static final class Stub extends io.envoyproxy.envoy.service.discovery.v2.HealthDiscoveryService implements Interface {
private Stub(com.google.protobuf.RpcChannel channel) {
this.channel = channel;
}
private final com.google.protobuf.RpcChannel channel;
public com.google.protobuf.RpcChannel getChannel() {
return channel;
}
public void streamHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(0),
controller,
request,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.class,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance()));
}
public void fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(1),
controller,
request,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.class,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance()));
}
}
public static BlockingInterface newBlockingStub(
com.google.protobuf.BlockingRpcChannel channel) {
return new BlockingStub(channel);
}
public interface BlockingInterface {
public io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier streamHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request)
throws com.google.protobuf.ServiceException;
public io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request)
throws com.google.protobuf.ServiceException;
}
private static final class BlockingStub implements BlockingInterface {
private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
this.channel = channel;
}
private final com.google.protobuf.BlockingRpcChannel channel;
public io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier streamHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request)
throws com.google.protobuf.ServiceException {
return (io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier) channel.callBlockingMethod(
getDescriptor().getMethods().get(0),
controller,
request,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance());
}
public io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier fetchHealthCheck(
com.google.protobuf.RpcController controller,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse request)
throws com.google.protobuf.ServiceException {
return (io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier) channel.callBlockingMethod(
getDescriptor().getMethods().get(1),
controller,
request,
io.envoyproxy.envoy.service.discovery.v2.HealthCheckSpecifier.getDefaultInstance());
}
}
// @@protoc_insertion_point(class_scope:envoy.service.discovery.v2.HealthDiscoveryService)
}