At runtime I want to have the option to overwrite / add / remove some of the options. Or to make it simpler, assume it is a boolean flag that I should be able to overwrite dynamically (for some effects) while most of them are using the default config. Sort of like
HttpClient.withTracerPropagation(false)
HttpClient.withTracerPropagation(false)
. Where I can disable some config for certain effects using HttpClient.
What's the best option here? Ideally it would be something like
MyServiceConfig.withBooleanFlag(false)
MyServiceConfig.withBooleanFlag(false)
.
Is there an example I can look into? Is this done by using