Use context.Context to enforce cancellation
It would be useful, when shutting down a server or even the lego command, that Ctrl+C can cancel any active & pending challenges in a way that their resources get cleaned up when shutting down.
In other words, an API that exposes context.Context which can be used for cancellation would be helpful. What do you think?
Implementing this in https://github.com/mholt/acme
Just ran into this. Doing a certain amount of testing means if I CTRL+C while lego is waiting for record propagation, it does not clean up DNS records.
And when doing DNS-01 it's not possible to gracefully stop application until timeout happens after 1 minute.