|
|
|
|
|
by eberkund
415 days ago
|
|
I created a small library for handling graceful shutdowns in my projects: https://github.com/eberkund/graceful I find that I typically have a few services that I need to start-up and sometimes they have different mechanisms for start-up and shutdown. Sometimes you need to instantiate an object first, sometimes you have a context you want to cancel, other times you have a "Stop" method to call. I designed the library to help my consolidate this all in one place with a unified API. |
|
https://pkg.go.dev/git.sr.ht/~mariusor/wrapper#example-Regis...