ReloadResult

sealed class ReloadResult<out T : Any>(source)

The outcome of ReloadableConfig.reload.

Inheritors

Types

Link copied to clipboard
data class Failed<T : Any>(val config: T, val error: Throwable) : ReloadResult<T>

The reload failed and the last good config was kept. error is a io.github.fiol_dev.konstant.core.ConfigException for invalid values, or whatever a source threw (a missing file, say).

Link copied to clipboard
data class Unchanged<T : Any>(val config: T) : ReloadResult<T>

The reload produced a valid config equal to the current one; nothing was published.

Link copied to clipboard
data class Updated<T : Any>(val config: T) : ReloadResult<T>

The reload produced a different valid config, which is now published.

Properties

Link copied to clipboard
abstract val config: T

The config that is current after the reload.