Interface GrpcRouteMatch

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GrpcRouteMatch.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.066Z") @Stability(Stable) public interface GrpcRouteMatch extends software.amazon.jsii.JsiiSerializable
The criterion for determining a request match for this Route.

At least one match type must be selected.

Example:

 VirtualRouter router;
 VirtualNode node;
 router.addRoute("route-http", RouteBaseProps.builder()
         .routeSpec(RouteSpec.grpc(GrpcRouteSpecOptions.builder()
                 .weightedTargets(List.of(WeightedTarget.builder()
                         .virtualNode(node)
                         .build()))
                 .match(GrpcRouteMatch.builder()
                         .serviceName("my-service.default.svc.cluster.local")
                         .build())
                 .timeout(GrpcTimeout.builder()
                         .idle(Duration.seconds(2))
                         .perRequest(Duration.seconds(1))
                         .build())
                 .build()))
         .build());
 
  • Method Details

    • getMetadata

      @Stability(Stable) @Nullable default List<HeaderMatch> getMetadata()
      Create metadata based gRPC route match.

      All specified metadata must match for the route to match.

      Default: - do not match on metadata

    • getMethodName

      @Stability(Stable) @Nullable default String getMethodName()
      The method name to match from the request.

      If the method name is specified, service name must be also provided.

      Default: - do not match on method name

    • getServiceName

      @Stability(Stable) @Nullable default String getServiceName()
      Create service name based gRPC route match.

      Default: - do not match on service name

    • builder

      @Stability(Stable) static GrpcRouteMatch.Builder builder()
      Returns:
      a GrpcRouteMatch.Builder of GrpcRouteMatch