Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupHandler ¶
func SetupHandler[T any](logger *zap.Logger, callback Callback[T], callbackParam T) (context.Context, context.CancelFunc)
SetupHandler sets up a context which reacts to shutdownSignals
Types ¶
type Callback ¶
Callback is a callback that will be invoked when one of the shutdownSignals is caught. It is required that the implementation of this function should be very quick to ensure that it finishes in time before the subsequent signal is caught which will result in a forced exit of the app.
Click to show internal directories.
Click to hide internal directories.