Interface GrpcConnectionPool
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
GrpcConnectionPool.Jsii$Proxy
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-09-10T01:10:04.822Z")
@Stability(Stable)
public interface GrpcConnectionPool
extends software.amazon.jsii.JsiiSerializable
Connection pool properties for gRPC listeners.
Example:
// 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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forGrpcConnectionPool
static final class
An implementation forGrpcConnectionPool
-
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcConnectionPool.Builder
builder()
The maximum requests in the pool.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMaxRequests
The maximum requests in the pool.Default: - none
-
builder
- Returns:
- a
GrpcConnectionPool.Builder
ofGrpcConnectionPool
-