Package io.grpc.xds
Class XdsServerWrapper.DiscoveryState
java.lang.Object
io.grpc.xds.XdsServerWrapper.DiscoveryState
- All Implemented Interfaces:
XdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
- Enclosing class:
XdsServerWrapper
private final class XdsServerWrapper.DiscoveryState
extends Object
implements XdsClient.ResourceWatcher<XdsListenerResource.LdsUpdate>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EnvoyServerProtoData.FilterChain
private List
<EnvoyServerProtoData.FilterChain> private final io.grpc.ServerInterceptor
private final String
private final Map
<String, XdsServerWrapper.DiscoveryState.RouteDiscoveryState> private final Map
<EnvoyServerProtoData.FilterChain, AtomicReference<XdsServerWrapper.ServerRoutingConfig>> private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private io.grpc.ServerInterceptor
combineInterceptors
(List<io.grpc.ServerInterceptor> interceptors) private com.google.common.collect.ImmutableMap
<VirtualHost.Route, io.grpc.ServerInterceptor> generatePerRouteInterceptors
(List<Filter.NamedFilterConfig> namedFilterConfigs, List<VirtualHost> virtualHosts) generateRoutingConfig
(EnvoyServerProtoData.FilterChain filterChain) private List
<SslContextProviderSupplier> private void
handleConfigNotFound
(io.grpc.StatusException exception) 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
private void
shutdown()
private void
-
Field Details
-
resourceName
-
routeDiscoveryStates
-
pendingRds
-
filterChains
-
defaultFilterChain
-
stopped
private boolean stopped -
savedRdsRoutingConfigRef
private final Map<EnvoyServerProtoData.FilterChain,AtomicReference<XdsServerWrapper.ServerRoutingConfig>> savedRdsRoutingConfigRef -
noopInterceptor
private final io.grpc.ServerInterceptor noopInterceptor
-
-
Constructor Details
-
DiscoveryState
-
-
Method Details
-
onChanged
- Specified by:
onChanged
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.
-
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>
-
shutdown
private void shutdown() -
updateSelector
private void updateSelector() -
generateRoutingConfig
private AtomicReference<XdsServerWrapper.ServerRoutingConfig> generateRoutingConfig(EnvoyServerProtoData.FilterChain filterChain) -
generatePerRouteInterceptors
private com.google.common.collect.ImmutableMap<VirtualHost.Route,io.grpc.ServerInterceptor> generatePerRouteInterceptors(List<Filter.NamedFilterConfig> namedFilterConfigs, List<VirtualHost> virtualHosts) -
combineInterceptors
-
handleConfigNotFound
private void handleConfigNotFound(io.grpc.StatusException exception) -
cleanUpRouteDiscoveryStates
private void cleanUpRouteDiscoveryStates() -
getSuppliersInUse
-
releaseSuppliersInFlight
private void releaseSuppliersInFlight()
-