@Internal @Singleton @Requires(property="aws.service-discovery.enabled",value="true",defaultValue="false") @Requires(classes=software.amazon.awssdk.services.servicediscovery.ServiceDiscoveryAsyncClient.class) @Requires(env="ec2") @Requires(beans=AwsServiceDiscoveryConfiguration.class) public class AwsServiceDiscoveryClient extends java.lang.Object implements io.micronaut.discovery.DiscoveryClient
DiscoveryClient
interface for AWS Route53.Constructor and Description |
---|
AwsServiceDiscoveryClient(AwsServiceDiscoveryClientConfiguration awsServiceDiscoveryClientConfiguration,
software.amazon.awssdk.services.servicediscovery.ServiceDiscoveryAsyncClient serviceDiscoveryAsyncClient)
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.
|
org.reactivestreams.Publisher<java.util.List<java.lang.String>> |
getServiceIds()
Gets a list of service IDs from AWS for a given namespace.
|
public AwsServiceDiscoveryClient(AwsServiceDiscoveryClientConfiguration awsServiceDiscoveryClientConfiguration, software.amazon.awssdk.services.servicediscovery.ServiceDiscoveryAsyncClient serviceDiscoveryAsyncClient)
awsServiceDiscoveryClientConfiguration
- The discovery configurationserviceDiscoveryAsyncClient
- The AWS serviceDiscoveryAsyncClientpublic 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