Package io.quarkus.registry.config
Interface RegistriesConfig
- All Known Subinterfaces:
RegistriesConfig.Mutable
- All Known Implementing Classes:
RegistriesConfigImpl,RegistriesConfigImpl.Builder
public interface RegistriesConfig
Registry 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic RegistriesConfig.Mutablebuilder()static RegistriesConfigRead config from the specified fileA list of registries that should queried when generating catalogs of platforms and extensions.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 this configuration to the specified file.static RegistriesConfigResolve 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 Details
-
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
- Returns:
- a mutable copy of this registry configuration
-
persist
Persist this configuration to the specified file.- Parameters:
p- Target path- Throws:
IOException- if the specified file can not be written to.
-
persist
Persist 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
Resolve the active registries configuration from system properties, the environment, and defaults.- Returns:
- immutable RegistriesConfig
-
resolveFromFile
Resolve the active registries configuration from the specified file- Parameters:
configYaml- Yaml file to read from- Returns:
- read-only RegistriesConfig object
-
fromFile
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
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
- Returns:
- a new mutable instance
-