interface GrpcRouteSpecOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.GrpcRouteSpecOptions |
Java | software.amazon.awscdk.services.appmesh.GrpcRouteSpecOptions |
Python | aws_cdk.aws_appmesh.GrpcRouteSpecOptions |
TypeScript (source) | @aws-cdk/aws-appmesh » GrpcRouteSpecOptions |
Properties specific for a GRPC Based Routes.
Example
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;
router.addRoute('route-http', {
routeSpec: appmesh.RouteSpec.grpc({
weightedTargets: [
{
virtualNode: node,
},
],
match: {
serviceName: 'my-service.default.svc.cluster.local',
},
timeout: {
idle : cdk.Duration.seconds(2),
perRequest: cdk.Duration.seconds(1),
},
}),
});
Properties
Name | Type | Description |
---|---|---|
match | Grpc | The criterion for determining a request match for this Route. |
weighted | Weighted [] | List of targets that traffic is routed to when a request matches the route. |
priority? | number | The priority for the route. |
retry | Grpc | The retry policy. |
timeout? | Grpc | An object that represents a grpc timeout. |
match
Type:
Grpc
The criterion for determining a request match for this Route.
weightedTargets
Type:
Weighted
[]
List of targets that traffic is routed to when a request matches the route.
priority?
Type:
number
(optional, default: no particular priority)
The priority for the route.
When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.
retryPolicy?
Type:
Grpc
(optional, default: no retry policy)
The retry policy.
timeout?
Type:
Grpc
(optional, default: None)
An object that represents a grpc timeout.