Class AwsServiceDiscoveryClientConfiguration
java.lang.Object
io.micronaut.http.client.HttpClientConfiguration
io.micronaut.discovery.client.DiscoveryClientConfiguration
io.micronaut.discovery.aws.servicediscovery.AwsServiceDiscoveryClientConfiguration
@Internal
@Requires(env="ec2") @Requires(property="aws.service-discovery.enabled",value="true",defaultValue="false")
@ConfigurationProperties("aws.service-discovery.client")
public class AwsServiceDiscoveryClientConfiguration
extends io.micronaut.discovery.client.DiscoveryClientConfiguration
Configuration for AWS Route 53 discovery.
- Since:
- 1.0 See https://docs.aws.amazon.com/Route53/latest/APIReference/overview-service-discovery.html for details info
- Author:
- Rvanderwerf
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.http.client.HttpClientConfiguration
io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration, io.micronaut.http.client.HttpClientConfiguration.DnsResolutionMode, io.micronaut.http.client.HttpClientConfiguration.Http2ClientConfiguration, io.micronaut.http.client.HttpClientConfiguration.WebSocketCompressionConfiguration -
Field Summary
FieldsFields inherited from class io.micronaut.http.client.HttpClientConfiguration
DEFAULT_ALLOW_BLOCK_EVENT_LOOP, DEFAULT_CONNECTION_POOL_IDLE_TIMEOUT_SECONDS, DEFAULT_DNS_RESOLUTION_MODE, DEFAULT_EXCEPTION_ON_ERROR_STATUS, DEFAULT_FOLLOW_REDIRECTS, DEFAULT_MAX_CONTENT_LENGTH, DEFAULT_READ_IDLE_TIMEOUT_MINUTES, DEFAULT_READ_TIMEOUT_SECONDS, DEFAULT_SHUTDOWN_QUIET_PERIOD_MILLISECONDS, DEFAULT_SHUTDOWN_TIMEOUT_MILLISECONDS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionservice id registered to aws.io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration@NonNull io.micronaut.discovery.DiscoveryConfigurationGets the discovery configuration.This is the name space ID for the domain/subdomain in route 53 service registry.@Nullable io.micronaut.discovery.registration.RegistrationConfigurationGet the registration configuration needed to register to service registry.protected Stringservice ID where you are going to be adding service instances to.voidsetAwsServiceId(String awsServiceId) set service id for easier testing.voidsetNamespaceId(String namespaceId) allows you to override the namespace id for testing.Methods inherited from class io.micronaut.discovery.client.DiscoveryClientConfiguration
getAllZones, getContextPath, getDefaultZone, getHost, getPort, getServiceId, isSecure, isShouldUseDns, setContextPath, setDefaultZone, setHost, setPort, setSecure, setShouldUseDns, setZones, toStringMethods inherited from class io.micronaut.http.client.HttpClientConfiguration
getAddressResolverGroupName, getAlpnModes, getChannelOptions, getConnectionPoolIdleTimeout, getConnectTimeout, getConnectTtl, getDefaultCharset, getDnsResolutionMode, getEventLoopGroup, getHttp2Configuration, getHttpVersion, getLoggerName, getLogLevel, getMaxContentLength, getNumOfThreads, getPcapLoggingPathPattern, getPlaintextMode, getProxyAddress, getProxyPassword, getProxySelector, getProxyType, getProxyUsername, getReadIdleTimeout, getReadTimeout, getRequestTimeout, getShutdownQuietPeriod, getShutdownTimeout, getSslConfiguration, getThreadFactory, getWebSocketCompressionConfiguration, isAllowBlockEventLoop, isExceptionOnErrorStatus, isFollowRedirects, resolveProxy, setAddressResolverGroupName, setAllowBlockEventLoop, setAlpnModes, setChannelOptions, setConnectionPoolIdleTimeout, setConnectTimeout, setConnectTtl, setDefaultCharset, setDnsResolutionMode, setEventLoopGroup, setExceptionOnErrorStatus, setFollowRedirects, setHttpVersion, setLoggerName, setLogLevel, setMaxContentLength, setNumOfThreads, setPcapLoggingPathPattern, setPlaintextMode, setProxyAddress, setProxyPassword, setProxySelector, setProxyType, setProxyUsername, setReadIdleTimeout, setReadTimeout, setRequestTimeout, setShutdownQuietPeriod, setShutdownTimeout, setSslConfiguration, setThreadFactory
-
Field Details
-
SERVICE_ID
- See Also:
-
PREFIX
- See Also:
-
-
Constructor Details
-
AwsServiceDiscoveryClientConfiguration
public AwsServiceDiscoveryClientConfiguration()
-
-
Method Details
-
getNamespaceId
This is the name space ID for the domain/subdomain in route 53 service registry. You must have this defined before doing any operations on using service registry.- Returns:
- namespace id
-
setNamespaceId
allows you to override the namespace id for testing.- Parameters:
namespaceId- name space id used for easy of testing
-
getServiceID
service ID where you are going to be adding service instances to.- Specified by:
getServiceIDin classio.micronaut.discovery.client.DiscoveryClientConfiguration- Returns:
- the service ID we are working with
-
getDiscovery
@NonNull public @NonNull io.micronaut.discovery.DiscoveryConfiguration getDiscovery()Gets the discovery configuration.- Specified by:
getDiscoveryin classio.micronaut.discovery.client.DiscoveryClientConfiguration- Returns:
- configuration
-
getRegistration
@Nullable public @Nullable io.micronaut.discovery.registration.RegistrationConfiguration getRegistration()Get the registration configuration needed to register to service registry.- Specified by:
getRegistrationin classio.micronaut.discovery.client.DiscoveryClientConfiguration- Returns:
- configuration
-
getAwsServiceId
service id registered to aws.- Returns:
- service id
-
setAwsServiceId
set service id for easier testing.- Parameters:
awsServiceId- service id
-
getConnectionPoolConfiguration
public io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration getConnectionPoolConfiguration()- Specified by:
getConnectionPoolConfigurationin classio.micronaut.http.client.HttpClientConfiguration
-