Package io.grpc.xds.client
Class ControlPlaneClient
java.lang.Object
io.grpc.xds.client.ControlPlaneClient
Common base type for XdsClient implementations, which encapsulates the layer abstraction of
the xDS RPC stream.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classfinal class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ControlPlaneClient.AdsStreamprivate final io.grpc.internal.BackoffPolicy.Providerprivate final EnvoyProtoData.Nodeprivate final XdsLoggerprivate final io.grpc.InternalLogIdprivate MessagePrettyPrinterprivate final XdsClient.ResourceStoreprivate io.grpc.internal.BackoffPolicyprivate io.grpc.SynchronizationContext.ScheduledHandleprivate final Bootstrapper.ServerInfoprivate booleanprivate final com.google.common.base.Stopwatchprivate final io.grpc.SynchronizationContextprivate final ScheduledExecutorServiceprivate final Map<XdsResourceType<?>, String> private final XdsClientprivate final XdsClient.XdsResponseHandlerprivate final XdsTransportFactory.XdsTransport -
Constructor Summary
ConstructorsConstructorDescriptionControlPlaneClient(XdsTransportFactory.XdsTransport xdsTransport, Bootstrapper.ServerInfo serverInfo, EnvoyProtoData.Node bootstrapNode, XdsClient.XdsResponseHandler xdsResponseHandler, XdsClient.ResourceStore resourceStore, ScheduledExecutorService timeService, io.grpc.SynchronizationContext syncContext, io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider, com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier, XdsClient xdsClient, MessagePrettyPrinter messagePrinter) An entity that manages ADS RPCs over a single channel. -
Method Summary
Modifier and TypeMethodDescription(package private) voidackResponse(XdsResourceType<?> type, String versionInfo, String nonce) Accepts the update for the given resource type by updating the latest resource version and sends an ACK request to the management server.(package private) voidadjustResourceSubscription(XdsResourceType<?> resourceType) Updates the resource subscription for the given resource type.(package private) XdsResourceType<?> fromTypeUrl(String typeUrl) (package private) booleanReturnstrueif the resource discovery is currently in backoff.(package private) booleanisReady()(package private) voidnackResponse(XdsResourceType<?> type, String nonce, String errorDetail) Rejects the update for the given resource type and sends an NACK request (request with last accepted version) to the management server.(package private) voidStarts a timer for each requested resource that hasn't been responded to and has been waiting for the channel to get ready.(package private) voidshutdown()private voidEstablishes the RPC connection by creating a new RPC stream on the given channel for xDS protocol communication.toString()
-
Field Details
-
syncContext
private final io.grpc.SynchronizationContext syncContext -
logId
private final io.grpc.InternalLogId logId -
logger
-
serverInfo
-
xdsTransport
-
xdsResponseHandler
-
resourceStore
-
timeService
-
backoffPolicyProvider
private final io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider -
stopwatch
private final com.google.common.base.Stopwatch stopwatch -
bootstrapNode
-
xdsClient
-
versions
-
shutdown
private boolean shutdown -
adsStream
-
retryBackoffPolicy
-
rpcRetryTimer
-
messagePrinter
-
-
Constructor Details
-
ControlPlaneClient
ControlPlaneClient(XdsTransportFactory.XdsTransport xdsTransport, Bootstrapper.ServerInfo serverInfo, EnvoyProtoData.Node bootstrapNode, XdsClient.XdsResponseHandler xdsResponseHandler, XdsClient.ResourceStore resourceStore, ScheduledExecutorService timeService, io.grpc.SynchronizationContext syncContext, io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider, com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier, XdsClient xdsClient, MessagePrettyPrinter messagePrinter) An entity that manages ADS RPCs over a single channel.
-
-
Method Details
-
shutdown
void shutdown() -
toString
-
adjustResourceSubscription
Updates the resource subscription for the given resource type. -
ackResponse
Accepts the update for the given resource type by updating the latest resource version and sends an ACK request to the management server. -
nackResponse
Rejects the update for the given resource type and sends an NACK request (request with last accepted version) to the management server. -
isInBackoff
boolean isInBackoff()Returnstrueif the resource discovery is currently in backoff. -
isReady
boolean isReady() -
readyHandler
void readyHandler()Starts a timer for each requested resource that hasn't been responded to and has been waiting for the channel to get ready. -
startRpcStream
private void startRpcStream()Establishes the RPC connection by creating a new RPC stream on the given channel for xDS protocol communication. -
fromTypeUrl
-