@Singleton @Requires(property="aws.route53.discovery.enabled",value="true",defaultValue="false") @Requires(classes=com.amazonaws.services.servicediscovery.AWSServiceDiscoveryAsync.class) @Requires(env="ec2") @Requires(beans=Route53DiscoveryConfiguration.class) public class Route53AutoNamingClient extends java.lang.Object implements io.micronaut.discovery.DiscoveryClient
DiscoveryClient
interface for AWS Route53.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENABLED
Configuration property for whether route53 is enabled.
|
Constructor and Description |
---|
Route53AutoNamingClient(Route53ClientDiscoveryConfiguration route53ClientDiscoveryConfiguration,
AWSServiceDiscoveryResolver awsServiceDiscoveryResolver,
io.micronaut.context.env.Environment environment)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close down AWS Client on shutdown.
|
java.lang.String |
getDescription()
The description.
|
org.reactivestreams.Publisher<java.util.List<io.micronaut.discovery.ServiceInstance>> |
getInstances(java.lang.String serviceId)
Gets a list of instances registered with Route53 given a service ID.
|
Route53ClientDiscoveryConfiguration |
getRoute53ClientDiscoveryConfiguration()
Used to help with testing.
|
org.reactivestreams.Publisher<java.util.List<java.lang.String>> |
getServiceIds()
Gets a list of service IDs from AWS for a given namespace.
|
void |
setRoute53ClientDiscoveryConfiguration(Route53ClientDiscoveryConfiguration route53ClientDiscoveryConfiguration)
Used to help with testing.
|
public static final java.lang.String ENABLED
public Route53AutoNamingClient(Route53ClientDiscoveryConfiguration route53ClientDiscoveryConfiguration, AWSServiceDiscoveryResolver awsServiceDiscoveryResolver, io.micronaut.context.env.Environment environment)
route53ClientDiscoveryConfiguration
- The route 53 configurationawsServiceDiscoveryResolver
- The AWS service discovery resolverenvironment
- The environmentpublic Route53ClientDiscoveryConfiguration getRoute53ClientDiscoveryConfiguration()
public void setRoute53ClientDiscoveryConfiguration(Route53ClientDiscoveryConfiguration route53ClientDiscoveryConfiguration)
route53ClientDiscoveryConfiguration
- config classpublic java.lang.String getDescription()
getDescription
in interface io.micronaut.core.naming.Described
public org.reactivestreams.Publisher<java.util.List<io.micronaut.discovery.ServiceInstance>> getInstances(java.lang.String serviceId)
getInstances
in interface io.micronaut.discovery.DiscoveryClient
serviceId
- The service idpublic org.reactivestreams.Publisher<java.util.List<java.lang.String>> getServiceIds()
getServiceIds
in interface io.micronaut.discovery.DiscoveryClient
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable