ConfigSource
A place config values are read from, such as environment variables or a file. For each field, ConfigLoader builds the key in keyFormat, then in each of fallbackKeyFormats, and asks get for each until one returns a value, before moving on to the next source.
class FlagSource(private val flags: Map<String, String>) : ConfigSource {
override val keyFormat = KeyFormat.DOT_NOTATION
override fun get(key: String): String? = flags[key]
}Content copied to clipboard
Inheritors
Properties
Link copied to clipboard
Further formats tried in order when the key in keyFormat has no value. None by default.
Link copied to clipboard
The key format tried first, e.g. KeyFormat.SCREAMING_SNAKE for environment variables.
Link copied to clipboard
A short label for reports such as ConfigLoader.explain, e.g. TomlSource.