Class GoogleDefaultXdsCredentialsProvider

java.lang.Object
io.grpc.xds.XdsCredentialsProvider
io.grpc.xds.internal.GoogleDefaultXdsCredentialsProvider

public final class GoogleDefaultXdsCredentialsProvider extends XdsCredentialsProvider
A wrapper class that supports GoogleDefaultChannelCredentials for Xds by implementing XdsCredentialsProvider.
  • Field Details

  • Constructor Details

    • GoogleDefaultXdsCredentialsProvider

      public GoogleDefaultXdsCredentialsProvider()
  • Method Details

    • newChannelCredentials

      protected io.grpc.ChannelCredentials newChannelCredentials(Map<String,?> jsonConfig)
      Description copied from class: XdsCredentialsProvider
      Creates a ChannelCredentials from the given jsonConfig, or null if the given config is invalid. The provider is free to ignore the config if it's not needed for producing the channel credentials.
      Specified by:
      newChannelCredentials in class XdsCredentialsProvider
      Parameters:
      jsonConfig - json config that can be consumed by the provider to create the channel credentials
    • getName

      protected String getName()
      Description copied from class: XdsCredentialsProvider
      Returns the xDS credential name associated with this provider which makes it selectable via XdsCredentialsRegistry.getProvider(String). This is called only when the class is loaded. It shouldn't change, and there is no point doing so.
      Specified by:
      getName in class XdsCredentialsProvider
    • isAvailable

      public boolean isAvailable()
      Description copied from class: XdsCredentialsProvider
      Whether this provider is available for use, taking the current environment into consideration. If false, XdsCredentialsProvider.newChannelCredentials(Map) is not safe to be called.
      Specified by:
      isAvailable in class XdsCredentialsProvider
    • priority

      public int priority()
      Description copied from class: XdsCredentialsProvider
      A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration. 5 should be considered the default, and then tweaked based on environment detection. A priority of 0 does not imply that the provider wouldn't work; just that it should be last in line.
      Specified by:
      priority in class XdsCredentialsProvider