Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler collects all services it handles interrupts for.
func NewInterruptHandler ¶
NewInterruptHandler return a new interrupt handler for the given services.
func (*Handler) ListenAndGracefulShutdown ¶
ListenAndGracefulShutdown monitors services for interrupts. If received, it starts a graceful shutdown of all the services it monitors. If the deadline for the graceful shutdown is reached, it will terminate all processes with os.Exit(1).
Click to show internal directories.
Click to hide internal directories.