watch
Reloads each time one of sources reports a change. Pass the same instances that the sources block adds, so the watched source is the one that is read:
val remote = RemoteSource()
val appConfig = ReloadableConfig.load(load = { loadAppConfig() }) { sources { +remote } }
appConfig.watch(scope, remote)Content copied to clipboard