@Singleton @Requires(env="digitalocean") public class DigitalOceanMetadataResolver extends 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 |
---|---|
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 Optional<ComputeInstanceMetadata> resolve(Environment environment)
ComputeInstanceMetadataResolver
ComputeInstanceMetadata
for the current environment if possible.resolve
in interface ComputeInstanceMetadataResolver
environment
- The environmentComputeInstanceMetadata