Package io.grpc.xds
Class ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState
java.lang.Object
io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
- Enclosing class:
ClusterResolverLoadBalancer.ClusterResolverLbState
private final class ClusterResolverLoadBalancer.ClusterResolverLbState.EdsClusterState
extends ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
implements XdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
-
Field Summary
FieldsFields inherited from class io.grpc.xds.ClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
filterMetadata, lrsServerInfo, maxConcurrentRequests, name, outlierDetection, resolved, result, shutdown, status, tlsContext
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
EdsClusterState
(String name, String edsServiceName, Bootstrapper.ServerInfo lrsServerInfo, Long maxConcurrentRequests, EnvoyServerProtoData.UpstreamTlsContext tlsContext, Map<String, com.google.protobuf.Struct> filterMetadata, EnvoyServerProtoData.OutlierDetection outlierDetection) -
Method Summary
Modifier and TypeMethodDescriptiongeneratePriorityNames
(String name, Map<Locality, Endpoints.LocalityLbEndpoints> localityLbEndpoints) void
void
onError
(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.void
onResourceDoesNotExist
(String resourceName) Called when the requested resource is not available.protected void
shutdown()
(package private) void
start()
-
Field Details
-
edsServiceName
-
localityPriorityNames
-
priorityNameGenId
int priorityNameGenId
-
-
Constructor Details
-
EdsClusterState
private EdsClusterState(String name, @Nullable String edsServiceName, @Nullable Bootstrapper.ServerInfo lrsServerInfo, @Nullable Long maxConcurrentRequests, @Nullable EnvoyServerProtoData.UpstreamTlsContext tlsContext, Map<String, com.google.protobuf.Struct> filterMetadata, @Nullable EnvoyServerProtoData.OutlierDetection outlierDetection)
-
-
Method Details
-
start
void start()- Specified by:
start
in classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
shutdown
protected void shutdown()- Overrides:
shutdown
in classClusterResolverLoadBalancer.ClusterResolverLbState.ClusterState
-
onChanged
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
-
generatePriorityNames
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcher
Called when the requested resource is not available.- Specified by:
onResourceDoesNotExist
in interfaceXdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
- Parameters:
resourceName
- name of the resource requested in discovery request.
-
onError
public void onError(io.grpc.Status error) Description copied from interface:XdsClient.ResourceWatcher
Called when the resource discovery RPC encounters some transient error.Note that we expect that the implementer to: - Comply with the guarantee to not generate certain statuses by the library: https://grpc.github.io/grpc/core/md_doc_statuscodes.html. If the code needs to be propagated to the channel, override it with
Status.Code.UNAVAILABLE
. - KeepStatus
description in one form or another, as it contains valuable debugging information.- Specified by:
onError
in interfaceXdsClient.ResourceWatcher<XdsEndpointResource.EdsUpdate>
-