Package io.grpc.xds
Class XdsNameResolver.ResolveState
java.lang.Object
io.grpc.xds.XdsNameResolver.ResolveState
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
- Enclosing class:
XdsNameResolver
private class XdsNameResolver.ResolveState
extends Object
implements XdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Discovery state for RouteConfiguration resource. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.grpc.NameResolver.ConfigOrError
private final String
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
cleanUpRoutes
(String error) 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.private void
start()
private void
stop()
private void
updateRoutes
(List<VirtualHost> virtualHosts, long httpMaxStreamDurationNano, List<Filter.NamedFilterConfig> filterConfigs)
-
Field Details
-
emptyServiceConfig
private final io.grpc.NameResolver.ConfigOrError emptyServiceConfig -
ldsResourceName
-
stopped
private boolean stopped -
existingClusters
-
routeDiscoveryState
-
-
Constructor Details
-
ResolveState
ResolveState(String ldsResourceName)
-
-
Method Details
-
onChanged
- Specified by:
onChanged
in interfaceXdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
-
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<XdsListenerResource.LdsUpdate>
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcher
Called when the requested resource is not available.- Specified by:
onResourceDoesNotExist
in interfaceXdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
- Parameters:
resourceName
- name of the resource requested in discovery request.
-
start
private void start() -
stop
private void stop() -
updateRoutes
private void updateRoutes(List<VirtualHost> virtualHosts, long httpMaxStreamDurationNano, @Nullable List<Filter.NamedFilterConfig> filterConfigs) -
cleanUpRoutes
-
cleanUpRouteDiscoveryState
private void cleanUpRouteDiscoveryState()
-