-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Currently we have several disparate lifecycle hooks, such as metrics, validation, post processor, path mapper.
However, we can rework them all into the concept of a lifecycle hook.
Where the post processor is a hook during compiling the config tree.
Where metrics are a hook before and after getting a config.
Hooks when there are errors as well as
Finally validation is a hook after a config has been received but before it is returned.
We can also add in additional hooks for transforming the keys and values as we build the config tree. This could be used to normalize the data instead of the SentenceLexer.
Logically there is no change in functionality, but by doing this we expose a more comprehensive system that people can use have greater control over their configuration library. Instead of using the validation system to modify a result, it would be more intuitive to leverage the postConfigLifecycle method.