Show / Hide Table of Contents

Class GrpcRouteSpecOptions

Properties specific for a GRPC Based Routes.

Inheritance
object
GrpcRouteSpecOptions
Implements
IGrpcRouteSpecOptions
IRouteSpecOptionsBase
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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

IGrpcRouteMatch

Remarks

ExampleMetadata: infused

Priority

The priority for the route.

public double? Priority { get; set; }
Property Value

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

IGrpcRetryPolicy

Remarks

Default: - no retry policy

Timeout

An object that represents a grpc timeout.

public IGrpcTimeout? Timeout { get; set; }
Property Value

IGrpcTimeout

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

IWeightedTarget[]

Remarks

ExampleMetadata: infused

Implements

IGrpcRouteSpecOptions
IRouteSpecOptionsBase
Back to top Generated by DocFX