Package io.grpc.xds
Class GrpcBootstrapperImpl
java.lang.Object
io.grpc.xds.client.Bootstrapper
io.grpc.xds.client.BootstrapperImpl
io.grpc.xds.GrpcBootstrapperImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.xds.client.BootstrapperImpl
BootstrapperImpl.FileReader, BootstrapperImpl.LocalFileReader
Nested classes/interfaces inherited from class io.grpc.xds.client.Bootstrapper
Bootstrapper.AuthorityInfo, Bootstrapper.BootstrapInfo, Bootstrapper.CertificateProviderInfo, Bootstrapper.ServerInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
(package private) String
(package private) String
(package private) String
(package private) String
Fields inherited from class io.grpc.xds.client.BootstrapperImpl
CLIENT_FEATURE_DISABLE_OVERPROVISIONING, CLIENT_FEATURE_RESOURCE_IN_SOTW, logger, reader
Fields inherited from class io.grpc.xds.client.Bootstrapper
XDSTP_SCHEME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns bootstrap configuration given by the raw data in JSON format.private static io.grpc.ChannelCredentials
getChannelCredentials
(Map<String, ?> serverConfig, String serverUri) protected Object
getImplSpecificConfig
(Map<String, ?> serverConfig, String serverUri) protected String
Gets the bootstrap config as JSON.private static io.grpc.ChannelCredentials
parseChannelCredentials
(List<Map<String, ?>> jsonList, String serverUri) Methods inherited from class io.grpc.xds.client.BootstrapperImpl
bootstrap, bootstrapBuilder, setFileReader
-
Field Details
-
BOOTSTRAP_PATH_SYS_ENV_VAR
- See Also:
-
BOOTSTRAP_PATH_SYS_PROPERTY
- See Also:
-
BOOTSTRAP_CONFIG_SYS_ENV_VAR
- See Also:
-
BOOTSTRAP_CONFIG_SYS_PROPERTY
- See Also:
-
bootstrapPathFromEnvVar
String bootstrapPathFromEnvVar -
bootstrapPathFromSysProp
String bootstrapPathFromSysProp -
bootstrapConfigFromEnvVar
String bootstrapConfigFromEnvVar -
bootstrapConfigFromSysProp
String bootstrapConfigFromSysProp
-
-
Constructor Details
-
GrpcBootstrapperImpl
GrpcBootstrapperImpl()
-
-
Method Details
-
bootstrap
public Bootstrapper.BootstrapInfo bootstrap(Map<String, ?> rawData) throws XdsInitializationExceptionDescription copied from class:Bootstrapper
Returns bootstrap configuration given by the raw data in JSON format.- Overrides:
bootstrap
in classBootstrapperImpl
- Throws:
XdsInitializationException
-
getJsonContent
Gets the bootstrap config as JSON. Searches the config (or file of config) with the following order:- A filesystem path defined by environment variable "GRPC_XDS_BOOTSTRAP"
- A filesystem path defined by Java System Property "io.grpc.xds.bootstrap"
- Environment variable value of "GRPC_XDS_BOOTSTRAP_CONFIG"
- Java System Property value of "io.grpc.xds.bootstrapConfig"
- Specified by:
getJsonContent
in classBootstrapperImpl
- Throws:
XdsInitializationException
IOException
-
getImplSpecificConfig
protected Object getImplSpecificConfig(Map<String, ?> serverConfig, String serverUri) throws XdsInitializationException- Specified by:
getImplSpecificConfig
in classBootstrapperImpl
- Throws:
XdsInitializationException
-
getChannelCredentials
private static io.grpc.ChannelCredentials getChannelCredentials(Map<String, ?> serverConfig, String serverUri) throws XdsInitializationException- Throws:
XdsInitializationException
-
parseChannelCredentials
@Nullable private static io.grpc.ChannelCredentials parseChannelCredentials(List<Map<String, ?>> jsonList, String serverUri) throws XdsInitializationException- Throws:
XdsInitializationException
-