@Singleton @Requires(env="digitalocean") public class DigitalOceanMetadataResolver extends java.lang.Object implements ComputeInstanceMetadataResolver
ComputeInstanceMetadata
for Digital Ocean.Constructor and Description |
---|
DigitalOceanMetadataResolver()
Construct with default settings.
|
DigitalOceanMetadataResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
DigitalOceanMetadataConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<ComputeInstanceMetadata> |
resolve(Environment environment)
Resolves
ComputeInstanceMetadata for the current environment if possible. |
@Inject public DigitalOceanMetadataResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, DigitalOceanMetadataConfiguration configuration)
objectMapper
- To read and write JSONconfiguration
- Digital Ocean Metadata configurationpublic DigitalOceanMetadataResolver()
public java.util.Optional<ComputeInstanceMetadata> resolve(Environment environment)
ComputeInstanceMetadataResolver
ComputeInstanceMetadata
for the current environment if possible.resolve
in interface ComputeInstanceMetadataResolver
environment
- The environmentComputeInstanceMetadata