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 classDiscovery state for RouteConfiguration resource. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.grpc.NameResolver.ConfigOrErrorprivate final Stringprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidcleanUpRoutes(String error) voidvoidonError(io.grpc.Status error) Called when the resource discovery RPC encounters some transient error.voidonResourceDoesNotExist(String resourceName) Called when the requested resource is not available.private voidstart()private voidstop()private voidupdateRoutes(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:
onChangedin interfaceXdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
-
onError
public void onError(io.grpc.Status error) Description copied from interface:XdsClient.ResourceWatcherCalled 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. - KeepStatusdescription in one form or another, as it contains valuable debugging information.- Specified by:
onErrorin interfaceXdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
-
onResourceDoesNotExist
Description copied from interface:XdsClient.ResourceWatcherCalled when the requested resource is not available.- Specified by:
onResourceDoesNotExistin 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()
-