|
|
|
|
|
by Raynos
865 days ago
|
|
I wrote a static config class that reads configuration for the entire app / server from a JSON or YAML file ( https://github.com/uber/zanzibar/blob/master/runtime/static_... ). Once you've loaded it and mutated it for testing purposes or for copying from ENV vars into the config, you can then freeze it before passing it down to all your app level code. Having this wrapper object that can be frozen and has a `get()` method to read JSON like data make it effectively not mutable. |
|
BTW kudos on zanzibar. Love the tech and the code).