gocharm
gocharm copied to clipboard
charmbits/service: move dependency injection logic from charmbits/httpservice
There's no particular reason that the dependency injection logic should be associated only with an HTTP server, and this would make for a much better separation of concerns.
One difficulty - the obvious way of doing this (have the service startServer function return a hook.Command) would make it harder to do zero-downtime server restarts, as the old command would need to be stopped before the new one is started. Some thought required there.