zio-config
zio-config copied to clipboard
Implement updateSourceAtKey
@afsalthaj can you share here some more details ?
@maciejbak85 Apologies. I completely missed out your message.
As of now we have data source override capabilities. For example
case class MyConfig(username: String, password: String)
val someSource: ConfigSource = ???
val config: ConfigDescriptor[MyConfig] = descriptor[MyConfig] from someSource
config.updateSource(source => constantSource <> source)
This will override the data in someSource
with constantSource
for all keys in MyConfig
.
We need to be able to target per field. It's an enhancement, and not a critical feature. However, it will be really interesting to implement.