Interface GrpcRetryPolicy
- All Superinterfaces:
HttpRetryPolicy
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
GrpcRetryPolicy.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:10.121Z")
@Stability(Stable)
public interface GrpcRetryPolicy
extends software.amazon.jsii.JsiiSerializable, HttpRetryPolicy
gRPC retry policy.
Example:
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());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forGrpcRetryPolicy
static final class
An implementation forGrpcRetryPolicy
-
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcRetryPolicy.Builder
builder()
default List<GrpcRetryEvent>
gRPC events on which to retry.Methods inherited from interface software.amazon.awscdk.services.appmesh.HttpRetryPolicy
getHttpRetryEvents, getRetryAttempts, getRetryTimeout, getTcpRetryEvents
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getGrpcRetryEvents
gRPC events on which to retry.You must specify at least one value for at least one types of retry events.
Default: - no retries for gRPC events
-
builder
- Returns:
- a
GrpcRetryPolicy.Builder
ofGrpcRetryPolicy
-