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 class
final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ControlPlaneClient.AdsStream
private final io.grpc.internal.BackoffPolicy.Provider
private final EnvoyProtoData.Node
private final XdsLogger
private final io.grpc.InternalLogId
private MessagePrettyPrinter
private final XdsClient.ResourceStore
private io.grpc.internal.BackoffPolicy
private io.grpc.SynchronizationContext.ScheduledHandle
private final Bootstrapper.ServerInfo
private boolean
private final com.google.common.base.Stopwatch
private final io.grpc.SynchronizationContext
private final ScheduledExecutorService
private final Map
<XdsResourceType<?>, String> private final XdsClient
private final XdsClient.XdsResponseHandler
private 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) void
ackResponse
(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) void
adjustResourceSubscription
(XdsResourceType<?> resourceType) Updates the resource subscription for the given resource type.(package private) XdsResourceType
<?> fromTypeUrl
(String typeUrl) (package private) boolean
Returnstrue
if the resource discovery is currently in backoff.(package private) boolean
isReady()
(package private) void
nackResponse
(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) void
Starts a timer for each requested resource that hasn't been responded to and has been waiting for the channel to get ready.(package private) void
shutdown()
private void
Establishes 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()Returnstrue
if 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
-