Enum DnsResponseType
- All Implemented Interfaces:
Serializable
,Comparable<DnsResponseType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.025Z")
@Stability(Stable)
public enum DnsResponseType
extends Enum<DnsResponseType>
Enum of DNS service discovery response type.
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
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDNS resolver is returning all the endpoints.DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints. -
Method Summary
Modifier and TypeMethodDescriptionstatic DnsResponseType
Returns the enum constant of this type with the specified name.static DnsResponseType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LOAD_BALANCER
DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints.It would not drain existing connections to other endpoints that are not part of this list.
-
ENDPOINTS
DNS resolver is returning all the endpoints.This also means that if an endpoint is missing, it would drain the current connections to the missing endpoint.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-