Class GoogleComputeMetadataConfiguration

java.lang.Object
io.micronaut.discovery.cloud.gcp.GoogleComputeMetadataConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@ConfigurationProperties("micronaut.application.gcp.metadata") @Requires(env="gcp") @Primary public class GoogleComputeMetadataConfiguration extends Object implements io.micronaut.core.util.Toggleable
Configuration for computing metadata for ComputePlatform.GOOGLE_COMPUTE.
Since:
1.0
Author:
graemerocher
  • Field Details

    • PREFIX

      public static final String PREFIX
      Prefix for Google Compute configuration.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_METADATAURL

      public static final String DEFAULT_METADATAURL
      The default metadata url value.
      See Also:
    • DEFAULT_PROJECTMETADATAURL

      public static final String DEFAULT_PROJECTMETADATAURL
      The default project metadata url value.
      See Also:
    • DEFAULT_READTIMEOUT

      public static final int DEFAULT_READTIMEOUT
      The default read timeout in seconds.
      See Also:
    • DEFAULT_CONNECTTIMEOUT

      public static final int DEFAULT_CONNECTTIMEOUT
      The default connect timeout in seconds.
      See Also:
  • Constructor Details

    • GoogleComputeMetadataConfiguration

      public GoogleComputeMetadataConfiguration()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      Whether the Google Compute configuration is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      Default value (true).
      Parameters:
      enabled - Enable or disable the Google Compute configuration
    • getMetadataUrl

      public String getMetadataUrl()
      Returns:
      The metadata Url
    • setMetadataUrl

      public void setMetadataUrl(String metadataUrl)
      Parameters:
      metadataUrl - The metadata Url
    • getProjectMetadataUrl

      public String getProjectMetadataUrl()
      Returns:
      The project metadata Url
    • setProjectMetadataUrl

      public void setProjectMetadataUrl(String projectMetadataUrl)
      Parameters:
      projectMetadataUrl - The project metadata Url
    • getReadTimeout

      public Duration getReadTimeout()
      Returns:
      The read timeout
    • setReadTimeout

      public void setReadTimeout(Duration readTimeout)
      Default value (5 seconds).
      Parameters:
      readTimeout - The read timeout
    • getConnectTimeout

      public Duration getConnectTimeout()
      Returns:
      The connect timeout
    • setConnectTimeout

      public void setConnectTimeout(Duration connectTimeout)
      Default value (2).
      Parameters:
      connectTimeout - The connect timeout