Show / Hide Table of Contents

Interface IGrpcRetryPolicy

gRPC retry policy.

Inherited Members
IHttpRetryPolicy.RetryAttempts
IHttpRetryPolicy.RetryTimeout
IHttpRetryPolicy.HttpRetryEvents
IHttpRetryPolicy.TcpRetryEvents
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGrpcRetryPolicy : IHttpRetryPolicy
Syntax (vb)
Public Interface IGrpcRetryPolicy Inherits IHttpRetryPolicy
Remarks

ExampleMetadata: infused

Examples
VirtualRouter router;
            VirtualNode node;


            router.AddRoute("route-grpc-retry", new RouteBaseProps {
                RouteSpec = RouteSpec.Grpc(new GrpcRouteSpecOptions {
                    WeightedTargets = new [] { new WeightedTarget { VirtualNode = node } },
                    Match = new GrpcRouteMatch { ServiceName = "servicename" },
                    RetryPolicy = new GrpcRetryPolicy {
                        TcpRetryEvents = new [] { TcpRetryEvent.CONNECTION_ERROR },
                        HttpRetryEvents = new [] { HttpRetryEvent.GATEWAY_ERROR },
                        // Retry if gRPC responds that the request was cancelled, a resource
                        // was exhausted, or if the service is unavailable
                        GrpcRetryEvents = new [] { GrpcRetryEvent.CANCELLED, GrpcRetryEvent.RESOURCE_EXHAUSTED, GrpcRetryEvent.UNAVAILABLE },
                        RetryAttempts = 5,
                        RetryTimeout = Duration.Seconds(1)
                    }
                })
            });

Synopsis

Properties

GrpcRetryEvents

gRPC events on which to retry.

Properties

GrpcRetryEvents

gRPC events on which to retry.

GrpcRetryEvent[]? GrpcRetryEvents { get; }
Property Value

GrpcRetryEvent[]

Remarks

You must specify at least one value for at least one types of retry events.

Default: - no retries for gRPC events

Back to top Generated by DocFX