github.com/skovtunenko/graterm (go): Package graterm provides capabilities to create a Terminator instance, register ordered termination Hooks, and block application execution until one of the registered os.Signal events occurs.  Termination hooks registered with the same Order will be executed concurrently.  It is possible to set individual timeouts for each registered termination hook and global termination timeout for the whole application.  Optionally a Hook may have a name (using Hook.WithName). It might be handy only if the Logger injected into Terminator instance to log internal termination lifecycle events.  Example code for generic application components:  Example code for HTTP server integration:
Keywords: graceful-degradation|graceful-restart-process|graceful-shutdown|graceful-stop|gracefull|gracefully|shutdown|shutdown-helper|shutdown-hook|shutdown-manager|shutdown-service|termination