Package io.quarkus.registry.config
Interface RegistriesConfig
-
- All Known Subinterfaces:
RegistriesConfig.Mutable
- All Known Implementing Classes:
RegistriesConfigImpl,RegistriesConfigImpl.Builder
public interface RegistriesConfigRegistry client configuration. Consists of a list of registry configurations that will be providing platform and extension information to the client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceRegistriesConfig.Mutable
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static RegistriesConfig.Mutablebuilder()static RegistriesConfigfromFile(Path path)Read config from the specified fileList<RegistryConfig>getRegistries()A list of registries that should queried when generating catalogs of platforms and extensions.ConfigSourcegetSource()booleanisDebug()Enables or disables registry client debug mode.default RegistriesConfig.Mutablemutable()static RegistriesConfig.MutablemutableFromFile(Path path)Read config from the specified filevoidpersist()Persist this configuration to the original source (if possible).default voidpersist(Path p)Persist this configuration to the specified file.static RegistriesConfigresolveConfig()Resolve the active registries configuration from system properties, the environment, and defaults.static RegistriesConfigresolveFromFile(Path configYaml)Resolve the active registries configuration from the specified file
-
-
-
Method Detail
-
isDebug
boolean isDebug()
Enables or disables registry client debug mode.- Returns:
- true if the debug mode should be enabled, otherwise - false
-
getRegistries
List<RegistryConfig> getRegistries()
A list of registries that should queried when generating catalogs of platforms and extensions.- Returns:
- list of registries that should queried when generating catalogs of platforms and extensions
-
getSource
ConfigSource getSource()
- Returns:
- ConfigSource that describes origin of this configuration
-
mutable
default RegistriesConfig.Mutable mutable()
- Returns:
- a mutable copy of this registry configuration
-
persist
default void persist(Path p) throws IOException
Persist this configuration to the specified file.- Parameters:
p- Target path- Throws:
IOException- if the specified file can not be written to.
-
persist
void persist() throws IOExceptionPersist this configuration to the original source (if possible). Does nothing for configurations read from environment variables.- Throws:
IOException- if the source file can not be written to.
-
resolveConfig
static RegistriesConfig resolveConfig()
Resolve the active registries configuration from system properties, the environment, and defaults.- Returns:
- immutable RegistriesConfig
-
resolveFromFile
static RegistriesConfig resolveFromFile(Path configYaml)
Resolve the active registries configuration from the specified file- Parameters:
configYaml- Yaml file to read from- Returns:
- read-only RegistriesConfig object
-
fromFile
static RegistriesConfig fromFile(Path path) throws IOException
Read config from the specified file- Parameters:
path- File to read from (yaml or json)- Returns:
- read-only RegistriesConfig object (will return defaults for an empty file)
- Throws:
IOException
-
mutableFromFile
static RegistriesConfig.Mutable mutableFromFile(Path path) throws IOException
Read config from the specified file- Parameters:
path- File to read from (yaml or json)- Returns:
- mutable (possibly incomplete) RegistriesConfig object (will return defaults for an empty file)
- Throws:
IOException
-
builder
static RegistriesConfig.Mutable builder()
- Returns:
- a new mutable instance
-
-