Class GrpcRouteSpecOptions
Properties specific for a GRPC Based Routes.
Inheritance
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GrpcRouteSpecOptions : Object, IGrpcRouteSpecOptions, IRouteSpecOptionsBase
Syntax (vb)
Public Class GrpcRouteSpecOptions
Inherits Object
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
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()
public GrpcRouteSpecOptions()
Properties
Match
The criterion for determining a request match for this Route.
public IGrpcRouteMatch Match { get; set; }
Property Value
Priority
The priority for the route.
public Nullable<double> Priority { get; set; }
Property Value
System.Nullable<System.Double>
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