Class GrpcRouteSpecOptions
Properties specific for a GRPC Based Routes.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GrpcRouteSpecOptions : IGrpcRouteSpecOptions, IRouteSpecOptionsBase
Syntax (vb)
Public Class GrpcRouteSpecOptions Implements IGrpcRouteSpecOptions, 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
Constructors
| GrpcRouteSpecOptions() | Properties specific for a GRPC Based Routes. |
Properties
| Match | The criterion for determining a request match for this Route. |
| Priority | The priority for the 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. |
Constructors
GrpcRouteSpecOptions()
Properties specific for a GRPC Based Routes.
public GrpcRouteSpecOptions()
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/") }
}
})
});
Properties
Match
The criterion for determining a request match for this Route.
public IGrpcRouteMatch Match { get; set; }
Property Value
Remarks
ExampleMetadata: infused
Priority
The priority for the route.
public double? Priority { get; set; }
Property Value
Remarks
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.
Default: - no particular priority
RetryPolicy
The retry policy.
public IGrpcRetryPolicy? RetryPolicy { get; set; }
Property Value
Remarks
Default: - no retry policy
Timeout
An object that represents a grpc timeout.
public IGrpcTimeout? Timeout { get; set; }
Property Value
Remarks
Default: - None
WeightedTargets
List of targets that traffic is routed to when a request matches the route.
public IWeightedTarget[] WeightedTargets { get; set; }
Property Value
Remarks
ExampleMetadata: infused