Closed ferringb closed 4 years ago
If folks have a better idea of how to handle unmarshal'able structs and the misalignment of configurables... specifically how to handle that without requiring me to duplicate fields (or define duplicate interfaces to accomplish this)- I'd be interested. I'm not a huge fan of what I had to do here for parsing, but I'm also working around configs I've been forced to inherit rather than what I'd design in a green field situation.
In the process, this adds support for
Begin
andInterval
to spec's. It also restructures the flow to make it so that new spec options- splay for example- can be added at the spec level and/or inherited from the manager level. That's the intended end goal.To get there, the 'control' had to be flipped from the manager (which should just be a dumb collector/holder of specs) to the specs for execution- this was accomplished via integrating context usage in. In doing so, proper reload support was added and opportunistic reload was removed- certmgr no longer tries to reload spec's unless it's explicitly told to do so. The upshot of this however is that certmgr now no longer requires a restart to reload all spec's- it's now able to do so.
That's a brief summary; see the commit messages for full details of each.
This PR primarily just restructures things for feature additions that will follow, while also realigning encapsulation so I can bury more internal details. Followup work will be thus:
certmgr reload
could return nonzero exit if the running instance detected config issues for reload).certmgr run --spec <spec> binary <args>
. If this is an hour to implement, I'll do so, if not, I'll leave it as an exercise for others.