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.FilterChainprivate List<EnvoyServerProtoData.FilterChain> private final io.grpc.ServerInterceptorprivate final Stringprivate final Map<String, XdsServerWrapper.DiscoveryState.RouteDiscoveryState> private final Map<EnvoyServerProtoData.FilterChain, AtomicReference<XdsServerWrapper.ServerRoutingConfig>> private boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate io.grpc.ServerInterceptorcombineInterceptors(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 voidhandleConfigNotFound(io.grpc.StatusException exception) 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 voidprivate voidshutdown()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:
onChangedin 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.
-
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>
-
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()
-