Package-level declarations

Reloadable configs and the remote source.

Types

Link copied to clipboard

A config that can be reloaded while the app runs. Every reload builds the sources again (so files are read again), loads and validates the config, and publishes it to config only if it is valid. A failed reload keeps the last good config and emits the error to failures. Reloads run one at a time, so a slow reload never overwrites a newer one.

Link copied to clipboard

A source whose values can change while the app runs, such as a remote config service. ReloadableConfig.watch reloads the config each time changes emits.

Link copied to clipboard
sealed class ReloadResult<out T : Any>

The outcome of ReloadableConfig.reload.

Link copied to clipboard
class RemoteSource(initial: Map<String, String> = emptyMap(), val keyFormat: KeyFormat = KeyFormat.DOT_NOTATION, val fallbackKeyFormats: List<KeyFormat> = listOf(KeyFormat.SCREAMING_SNAKE), val name: String = "RemoteSource") : ReloadableSource

A source whose values are pushed in by the app, typically from a remote config service. It works with any provider: fetch the values, then call update. Each change is reported on changes, so ReloadableConfig.watch reloads the config: