I don't think its off topic.  But: I don't really get a feel for the 
problem/challenge that you are facing, so its a little hard to try and 
help.  Maybe unpacking the term "runtime config" would help. How is 
"runtime config" different from regular configuration files or structs?  

I do usually have a separate "config" struct for each "service" struct. And 
the config structs entire point is to have public members that are 
serialized and deserialized; and filled in from command line parameter 
flags.

If configuration just needs to be "more dynamic", and just to suggest 
something to let you react to, I wrote a scripting language to configure 
trees of structs and their parameters at runtime.  But, again, this is just 
a stab in the dark since the challenge you are facing is a little vague to 
me. https://github.com/glycerine/zygomys is that scripting language. The 
full generality of a programming language isn't usually needed for 
configuration, but it is, on occasion, very convenient.

If you use command line flags and want to combine several libraries that 
use command line flags for configuration into one program, then I use the 
pattern described here to good 
effect: https://github.com/glycerine/configs-in-golang

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f07bdb9f-c9fa-4abb-be0d-e1e79284238fn%40googlegroups.com.

Reply via email to