Class GrpcRouteMatch
The criterion for determining a request match for this Route.
Inheritance
System.Object
GrpcRouteMatch
Implements
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.AWS.AppMesh.dll
Syntax (csharp)
public class GrpcRouteMatch : Object, IGrpcRouteMatch
Syntax (vb)
Public Class GrpcRouteMatch
Inherits Object
Implements IGrpcRouteMatch
Remarks
At least one match type must be selected.
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http", new RouteBaseProps {
RouteSpec = RouteSpec.Grpc(new GrpcRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node
} },
Match = new GrpcRouteMatch {
ServiceName = "my-service.default.svc.cluster.local"
},
Timeout = new GrpcTimeout {
Idle = Duration.Seconds(2),
PerRequest = Duration.Seconds(1)
}
})
});
Synopsis
Constructors
GrpcRouteMatch() |
Properties
Metadata | Create metadata based gRPC route match. |
MethodName | The method name to match from the request. |
ServiceName | Create service name based gRPC route match. |
Constructors
GrpcRouteMatch()
public GrpcRouteMatch()
Properties
Metadata
Create metadata based gRPC route match.
public HeaderMatch[] Metadata { get; set; }
Property Value
Remarks
All specified metadata must match for the route to match.
Default: - do not match on metadata
MethodName
The method name to match from the request.
public string MethodName { get; set; }
Property Value
System.String
Remarks
If the method name is specified, service name must be also provided.
Default: - do not match on method name
ServiceName
Create service name based gRPC route match.
public string ServiceName { get; set; }
Property Value
System.String
Remarks
Default: - do not match on service name