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 interfaceReads the content of the file with the given path in the file system.protected static enumNested classes/interfaces inherited from class io.grpc.xds.client.Bootstrapper
Bootstrapper.AuthorityInfo, Bootstrapper.BootstrapInfo, Bootstrapper.CertificateProviderInfo, Bootstrapper.ServerInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected final XdsLoggerprotected BootstrapperImpl.FileReaderprivate static final StringFields 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.BuilderbootstrapBuilder(Map<String, ?> rawData) private static <T> TcheckForNull(T value, String fieldName) protected abstract ObjectgetImplSpecificConfig(Map<String, ?> serverConfig, String serverUri) protected abstract Stringprivate 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:
bootstrapin classBootstrapper- Throws:
XdsInitializationException
-
bootstrap
public Bootstrapper.BootstrapInfo bootstrap(Map<String, ?> rawData) throws XdsInitializationExceptionDescription copied from class:BootstrapperReturns bootstrap configuration given by the raw data in JSON format.- Overrides:
bootstrapin 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
-