Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
Callback is a function to provide service shutdown. This function should return status of shutdown and error in case of problems.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles shutting process
func NewHandler ¶
func NewHandler(logger logrus.FieldLogger) *Handler
NewHandler creates an instance of Handler
func (*Handler) AddShutdownSignal ¶
AddShutdownSignal adds a user-defined signals to shutdown. It might be helpful for testing.
func (*Handler) RegisterShutdown ¶
RegisterShutdown set up a channel where we can send signal notifications and listen for the signal. We must use a buffered channel, or risk missing the signal if we're not ready to receive it when the signal is sent. We strongly recommend to use this function once. ToDo: how do we want to process case if user register few different shutdowns?