Package io.grpc.xds.client
Class BootstrapperImpl
java.lang.Object
io.grpc.xds.client.Bootstrapper
io.grpc.xds.client.BootstrapperImpl
- Direct Known Subclasses:
GrpcBootstrapperImpl
A
Bootstrapper
implementation that reads xDS configurations from local file system.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Reads the content of the file with the given path in the file system.protected static enum
Nested classes/interfaces inherited from class io.grpc.xds.client.Bootstrapper
Bootstrapper.AuthorityInfo, Bootstrapper.BootstrapInfo, Bootstrapper.CertificateProviderInfo, Bootstrapper.ServerInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
protected final XdsLogger
protected BootstrapperImpl.FileReader
private static final String
Fields inherited from class io.grpc.xds.client.Bootstrapper
XDSTP_SCHEME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReads and parses bootstrap config.Returns bootstrap configuration given by the raw data in JSON format.protected Bootstrapper.BootstrapInfo.Builder
bootstrapBuilder
(Map<String, ?> rawData) private static <T> T
checkForNull
(T value, String fieldName) protected abstract Object
getImplSpecificConfig
(Map<String, ?> serverConfig, String serverUri) protected abstract String
private List
<Bootstrapper.ServerInfo> parseServerInfos
(List<?> rawServerConfigs, XdsLogger logger) void
-
Field Details
-
CLIENT_FEATURE_DISABLE_OVERPROVISIONING
- See Also:
-
CLIENT_FEATURE_RESOURCE_IN_SOTW
- See Also:
-
SERVER_FEATURE_IGNORE_RESOURCE_DELETION
- See Also:
-
logger
-
reader
-
-
Constructor Details
-
BootstrapperImpl
protected BootstrapperImpl()
-
-
Method Details
-
getJsonContent
-
getImplSpecificConfig
protected abstract Object getImplSpecificConfig(Map<String, ?> serverConfig, String serverUri) throws XdsInitializationException- Throws:
XdsInitializationException
-
bootstrap
Reads and parses bootstrap config. The config is expected to be in JSON format.- Specified by:
bootstrap
in classBootstrapper
- Throws:
XdsInitializationException
-
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 classBootstrapper
- Throws:
XdsInitializationException
-
bootstrapBuilder
protected Bootstrapper.BootstrapInfo.Builder bootstrapBuilder(Map<String, ?> rawData) throws XdsInitializationException- Throws:
XdsInitializationException
-
parseServerInfos
private List<Bootstrapper.ServerInfo> parseServerInfos(List<?> rawServerConfigs, XdsLogger logger) throws XdsInitializationException - Throws:
XdsInitializationException
-
setFileReader
-
checkForNull
- Throws:
XdsInitializationException
-