@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T09:30:45.186Z") @Stability(value=Stable) public interface GrpcRetryPolicy extends software.amazon.jsii.JsiiSerializable, HttpRetryPolicy
Example:
// Example automatically generated from non-compiling source. May contain errors. VirtualRouter router; VirtualNode node; router.addRoute("route-grpc-retry", RouteBaseProps.builder() .routeSpec(RouteSpec.grpc(GrpcRouteSpecOptions.builder() .weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build())) .match(GrpcRouteMatch.builder().serviceName("servicename").build()) .retryPolicy(GrpcRetryPolicy.builder() .tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR)) .httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR)) // Retry if gRPC responds that the request was cancelled, a resource // was exhausted, or if the service is unavailable .grpcRetryEvents(List.of(GrpcRetryEvent.CANCELLED, GrpcRetryEvent.RESOURCE_EXHAUSTED, GrpcRetryEvent.UNAVAILABLE)) .retryAttempts(5) .retryTimeout(Duration.seconds(1)) .build()) .build())) .build());
Modifier and Type | Interface and Description |
---|---|
static class |
GrpcRetryPolicy.Builder
A builder for
GrpcRetryPolicy |
static class |
GrpcRetryPolicy.Jsii$Proxy
An implementation for
GrpcRetryPolicy |
Modifier and Type | Method and Description |
---|---|
static GrpcRetryPolicy.Builder |
builder() |
default List<GrpcRetryEvent> |
getGrpcRetryEvents()
gRPC events on which to retry.
|
getHttpRetryEvents, getRetryAttempts, getRetryTimeout, getTcpRetryEvents
@Stability(value=Stable) @Nullable default List<GrpcRetryEvent> getGrpcRetryEvents()
You must specify at least one value for at least one types of retry events.
Default: - no retries for gRPC events
@Stability(value=Stable) static GrpcRetryPolicy.Builder builder()
builder
in interface HttpRetryPolicy
GrpcRetryPolicy.Builder
of GrpcRetryPolicy
Copyright © 2022. All rights reserved.