This PR provides proper support for layering configuration values and should make it easier to build out some important features such as watching and rollbacks in the future.
I've created a new Configuration struct and module to provide all of the layering functionality. I think this is a terrible name so we should probably change it. The main role of Configuration is to hold onto a list of values that have been resolved from whatever provider. It can collapse these values into a list of keys which can then be easily loaded into an ets table. It can also maintain previous versions. Currently the versions are unused and only there for demonstration purposes. I suspect that realistically we'll want to use some sort of circular buffer or other bounded data structure to hold versions.
I've also created a Plan module for building up these configuration plans. Personally I find this to be a very shallow module but for some reason I felt compelled to keep those things separate for now. If anyone has better ideas here I'm happy to hear them.
Let me know what you think. @jeffweiss I know that you had some thoughts on this as well so let me know if this jives well with what you've been playing around with.
This PR provides proper support for layering configuration values and should make it easier to build out some important features such as watching and rollbacks in the future.
I've created a new Configuration struct and module to provide all of the layering functionality. I think this is a terrible name so we should probably change it. The main role of Configuration is to hold onto a list of values that have been resolved from whatever provider. It can collapse these values into a list of keys which can then be easily loaded into an ets table. It can also maintain previous versions. Currently the versions are unused and only there for demonstration purposes. I suspect that realistically we'll want to use some sort of circular buffer or other bounded data structure to hold versions.
I've also created a
Plan
module for building up these configuration plans. Personally I find this to be a very shallow module but for some reason I felt compelled to keep those things separate for now. If anyone has better ideas here I'm happy to hear them.Let me know what you think. @jeffweiss I know that you had some thoughts on this as well so let me know if this jives well with what you've been playing around with.