Class DigitalOceanMetadataResolver
java.lang.Object
io.micronaut.discovery.cloud.digitalocean.DigitalOceanMetadataResolver
- All Implemented Interfaces:
ComputeInstanceMetadataResolver
@Singleton
@Requires(env="digitalocean")
public class DigitalOceanMetadataResolver
extends Object
implements ComputeInstanceMetadataResolver
Resolves
ComputeInstanceMetadata
for Digital Ocean.- Since:
- 1.1
- Author:
- Alvaro Sanchez-Mariscal
-
Constructor Summary
ConstructorDescriptionConstruct with default settings.DigitalOceanMetadataResolver
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, DigitalOceanMetadataConfiguration configuration) DigitalOceanMetadataResolver
(DigitalOceanMetadataConfiguration configuration, com.fasterxml.jackson.core.JsonFactory jsonFactory, JsonMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionresolve
(Environment environment) ResolvesComputeInstanceMetadata
for the current environment if possible.
-
Constructor Details
-
DigitalOceanMetadataResolver
@Inject public DigitalOceanMetadataResolver(DigitalOceanMetadataConfiguration configuration, com.fasterxml.jackson.core.JsonFactory jsonFactory, JsonMapper mapper) - Parameters:
configuration
- Digital Ocean Metadata configurationjsonFactory
- Factory to use for json parsingmapper
- Mapper to use for deserialization
-
DigitalOceanMetadataResolver
public DigitalOceanMetadataResolver()Construct with default settings. -
DigitalOceanMetadataResolver
public DigitalOceanMetadataResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, DigitalOceanMetadataConfiguration configuration) - Parameters:
objectMapper
- To read and write JSONconfiguration
- Digital Ocean Metadata configuration
-
-
Method Details
-
resolve
Description copied from interface:ComputeInstanceMetadataResolver
ResolvesComputeInstanceMetadata
for the current environment if possible.- Specified by:
resolve
in interfaceComputeInstanceMetadataResolver
- Parameters:
environment
- The environment- Returns:
- The
ComputeInstanceMetadata
-