Interface IGrpcRouteSpecOptions
Properties specific for a GRPC Based Routes.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGrpcRouteSpecOptions : IRouteSpecOptionsBase
Syntax (vb)
Public Interface IGrpcRouteSpecOptions
Inherits IRouteSpecOptionsBase
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 {
// When method name is specified, service name must be also specified.
MethodName = "methodname",
ServiceName = "servicename",
Metadata = new [] { HeaderMatch.ValueStartsWith("Content-Type", "application/"), HeaderMatch.ValueDoesNotStartWith("Content-Type", "text/") }
}
})
});
Synopsis
Properties
Match | The criterion for determining a request match for this Route. |
RetryPolicy | The retry policy. |
Timeout | An object that represents a grpc timeout. |
WeightedTargets | List of targets that traffic is routed to when a request matches the route. |
Properties
Match
The criterion for determining a request match for this Route.
IGrpcRouteMatch Match { get; }
Property Value
RetryPolicy
The retry policy.
virtual IGrpcRetryPolicy RetryPolicy { get; }
Property Value
Remarks
Default: - no retry policy
Timeout
An object that represents a grpc timeout.
virtual IGrpcTimeout Timeout { get; }
Property Value
Remarks
Default: - None
WeightedTargets
List of targets that traffic is routed to when a request matches the route.
IWeightedTarget[] WeightedTargets { get; }
Property Value