Class AwsServiceDiscoveryConfiguration
java.lang.Object
io.micronaut.discovery.DiscoveryConfiguration
io.micronaut.discovery.aws.servicediscovery.AwsServiceDiscoveryConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
@Internal
@Requires(env="ec2") @Requires(property="aws.service-discovery.enabled",value="true",defaultValue="false")
@ConfigurationProperties("aws.service-discovery")
public class AwsServiceDiscoveryConfiguration
extends io.micronaut.discovery.DiscoveryConfiguration
- Since:
- 1.0 See https://docs.aws.amazon.com/Route53/latest/APIReference/overview-service-discovery.html for details info
- Author:
- Rvanderwerf
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Configuration property for whether discovery is enabled.static final String
Fields inherited from class io.micronaut.discovery.DiscoveryConfiguration
DEFAULT_ENABLED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAWS Service ID.boolean
enable/disable this feature.void
setAwsServiceId
(String awsServiceId) set service ID for easier testing.void
setEnabled
(boolean enabled) enable/disabled this feature.
-
Field Details
-
PREFIX
- See Also:
-
ENABLED
Configuration property for whether discovery is enabled.- See Also:
-
-
Constructor Details
-
AwsServiceDiscoveryConfiguration
public AwsServiceDiscoveryConfiguration()
-
-
Method Details
-
getAwsServiceId
AWS Service ID.- Returns:
- service id
-
setAwsServiceId
set service ID for easier testing.- Parameters:
awsServiceId
- aws service id
-
isEnabled
public boolean isEnabled()enable/disable this feature.- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
- Overrides:
isEnabled
in classio.micronaut.discovery.DiscoveryConfiguration
- Returns:
- enabled
-
setEnabled
public void setEnabled(boolean enabled) enable/disabled this feature. Default value (true).- Overrides:
setEnabled
in classio.micronaut.discovery.DiscoveryConfiguration
- Parameters:
enabled
- Whether discovery is enabled
-