@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.533Z") @Stability(value=Stable) public interface GrpcConnectionPool extends software.amazon.jsii.JsiiSerializable
Example:
// Example automatically generated from non-compiling source. May contain errors.
// A Virtual Node with a gRPC listener with a connection pool set
Mesh mesh;
VirtualNode node = VirtualNode.Builder.create(this, "node")
.mesh(mesh)
// DNS service discovery can optionally specify the DNS response type as either LOAD_BALANCER or ENDPOINTS.
// LOAD_BALANCER means that the DNS resolver returns a loadbalanced set of endpoints,
// whereas ENDPOINTS means that the DNS resolver is returning all the endpoints.
// By default, the response type is assumed to be LOAD_BALANCER
.serviceDiscovery(ServiceDiscovery.dns("node", DnsResponseType.ENDPOINTS))
.listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
.port(80)
.connectionPool(HttpConnectionPool.builder()
.maxConnections(100)
.maxPendingRequests(10)
.build())
.build())))
.build();
// A Virtual Gateway with a gRPC listener with a connection pool set
VirtualGateway gateway = VirtualGateway.Builder.create(this, "gateway")
.mesh(mesh)
.listeners(List.of(VirtualGatewayListener.grpc(GrpcGatewayListenerOptions.builder()
.port(8080)
.connectionPool(GrpcConnectionPool.builder()
.maxRequests(10)
.build())
.build())))
.virtualGatewayName("gateway")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
GrpcConnectionPool.Builder
A builder for
GrpcConnectionPool |
static class |
GrpcConnectionPool.Jsii$Proxy
An implementation for
GrpcConnectionPool |
| Modifier and Type | Method and Description |
|---|---|
static GrpcConnectionPool.Builder |
builder() |
Number |
getMaxRequests()
The maximum requests in the pool.
|
@Stability(value=Stable) @NotNull Number getMaxRequests()
Default: - none
@Stability(value=Stable) static GrpcConnectionPool.Builder builder()
GrpcConnectionPool.Builder of GrpcConnectionPoolCopyright © 2022. All rights reserved.