@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:24.363Z") @Stability(value=Experimental) public interface GrpcRouteMatch extends software.amazon.jsii.JsiiSerializable
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
GrpcRouteMatch.Builder
A builder for
GrpcRouteMatch |
static class |
GrpcRouteMatch.Jsii$Proxy
An implementation for
GrpcRouteMatch |
| Modifier and Type | Method and Description |
|---|---|
static GrpcRouteMatch.Builder |
builder() |
default List<HeaderMatch> |
getMetadata()
(experimental) Create metadata based gRPC route match.
|
default String |
getMethodName()
(experimental) The method name to match from the request.
|
default String |
getServiceName()
(experimental) Create service name based gRPC route match.
|
@Stability(value=Experimental) @Nullable default List<HeaderMatch> getMetadata()
All specified metadata must match for the route to match.
Default: - do not match on metadata
@Stability(value=Experimental) @Nullable default String getMethodName()
If the method name is specified, service name must be also provided.
Default: - do not match on method name
@Stability(value=Experimental) @Nullable default String getServiceName()
Default: - do not match on service name
@Stability(value=Experimental) static GrpcRouteMatch.Builder builder()
GrpcRouteMatch.Builder of GrpcRouteMatchCopyright © 2022. All rights reserved.