docker-gen
docker-gen copied to clipboard
Allow docker-gen to be used as a library
As discussed briefly at https://github.com/jwilder/docker-gen/pull/130 and https://github.com/jwilder/nginx-proxy/pull/254, it could be beneficial to restructure docker-gen to be usable both as a standalone binary and as an embedded library.
I'm opening this issue as a place to discuss the details of such a change.
+1 I would like to make a plugin to another go app so it can reconfigure itself.
I would love an api that notifies me anytime the set of running containers changes. Perhaps I can provide a callback that will receive []*RunningContainer anytime something new happens, or on an interval.
FYI, I've started some work on this change here: https://github.com/appropriate/docker-gen/tree/generator
It's currently not compiling due to being in an intermediate state. I still need to figure out how to deal with the GeneratorConfig struct and I haven't had time to work on this in the last week.