Package io.grpc.xds.client
Class LoadReportClient
java.lang.Object
io.grpc.xds.client.LoadReportClient
Client of xDS load reporting service based on LRS protocol, which reports load stats of
gRPC client's perspective to a management server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.grpc.internal.BackoffPolicy.Providerfinal LoadStatsManager2private final XdsLoggerprivate final io.grpc.InternalLogIdprivate io.grpc.internal.BackoffPolicyprivate io.grpc.SynchronizationContext.ScheduledHandleprivate LoadReportClient.LrsStreamprivate static final io.grpc.MethodDescriptor<LoadStatsRequest, LoadStatsResponse> private final EnvoyProtoData.Nodeprivate final com.google.common.base.Stopwatchprivate booleanprivate final io.grpc.SynchronizationContextprivate final ScheduledExecutorServiceprivate final XdsTransportFactory.XdsTransport -
Constructor Summary
ConstructorsConstructorDescriptionLoadReportClient(LoadStatsManager2 loadStatsManager, XdsTransportFactory.XdsTransport xdsTransport, EnvoyProtoData.Node node, io.grpc.SynchronizationContext syncContext, ScheduledExecutorService scheduledExecutorService, io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider, com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidEstablishes load reporting communication and negotiates with traffic director to report load stats periodically.private voidvoidTerminates load reporting.
-
Field Details
-
logId
private final io.grpc.InternalLogId logId -
logger
-
xdsTransport
-
node
-
syncContext
private final io.grpc.SynchronizationContext syncContext -
timerService
-
retryStopwatch
private final com.google.common.base.Stopwatch retryStopwatch -
backoffPolicyProvider
private final io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider -
loadStatsManager
-
started
private boolean started -
lrsRpcRetryPolicy
-
lrsRpcRetryTimer
-
lrsStream
-
method
-
-
Constructor Details
-
LoadReportClient
public LoadReportClient(LoadStatsManager2 loadStatsManager, XdsTransportFactory.XdsTransport xdsTransport, EnvoyProtoData.Node node, io.grpc.SynchronizationContext syncContext, ScheduledExecutorService scheduledExecutorService, io.grpc.internal.BackoffPolicy.Provider backoffPolicyProvider, com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier)
-
-
Method Details
-
lrsStreamIsNull
public boolean lrsStreamIsNull() -
startLoadReporting
public void startLoadReporting()Establishes load reporting communication and negotiates with traffic director to report load stats periodically. Calling this method on an already startedLoadReportClientis no-op. -
stopLoadReporting
public void stopLoadReporting()Terminates load reporting. Calling this method on an already stoppedLoadReportClientis no-op. -
startLrsRpc
private void startLrsRpc()
-