lalamove / konfig

Composable, observable and performant config handling for Go for the distributed processing era

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inverse NoStopOnFailure and move to Loader level, rather than global only

mikn opened this issue · comments

Currently, we force configurations to specify when they think failure is acceptable. However - most configuration sources most likely think that failure is acceptable for certain content of the configuration.
#19 has a good example where if you put the wrong YAML into a dynamically loaded configuration, it will exit the application after hitting MaxRetry unless you specify NoStopOnFailure. This may be unintuitive and cause major outages unless people read the documentation closely.

We have the requirement however to exit on a specific loader (that is if it fails to load credentials from Vault, the application may as well exit and let Kubernetes handle retries/backoff etc), so we need to support specifying StopOnFailure for each individual Loader.