Documentation
¶
Index ¶
- type ShutdownHandler
- func (h *ShutdownHandler) IsHealthy() error
- func (h *ShutdownHandler) Register(stoppable stop.Stoppable, front ...bool)
- func (h *ShutdownHandler) ShutdownAllAndStopWaiting()
- func (h *ShutdownHandler) ShutdownSignalReceived()
- func (h *ShutdownHandler) String() string
- func (h *ShutdownHandler) WaitUntilSignal()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShutdownHandler ¶ added in v0.0.19
type ShutdownHandler struct {
// contains filtered or unexported fields
}
func InstallHandler ¶
func InstallHandler(orderedStopables []stop.Stoppable, logger zerolog.Logger) *ShutdownHandler
InstallHandler installs a handler for syscall.SIGINT, syscall.SIGTERM
func (*ShutdownHandler) IsHealthy ¶ added in v0.0.19
func (h *ShutdownHandler) IsHealthy() error
IsHealthy returns an error in case a shutdown is currently in progress. The error is returned to indicate that the service is not healthy any more (can't handle any requests)
func (*ShutdownHandler) Register ¶ added in v0.0.19
func (h *ShutdownHandler) Register(stoppable stop.Stoppable, front ...bool)
Register a Stopable for shutdown handling. Per default the Stopable is added to the front of the list of Stopable's this means the Stopable that was the last one registered will be the first being called for shutdown. If you call Register(stopable,false) you can add this Stopable to the end of the list of registered Stopables.
func (*ShutdownHandler) ShutdownAllAndStopWaiting ¶ added in v0.0.19
func (h *ShutdownHandler) ShutdownAllAndStopWaiting()
func (*ShutdownHandler) ShutdownSignalReceived ¶ added in v0.0.19
func (h *ShutdownHandler) ShutdownSignalReceived()
func (*ShutdownHandler) String ¶ added in v0.0.19
func (h *ShutdownHandler) String() string
func (*ShutdownHandler) WaitUntilSignal ¶ added in v0.0.19
func (h *ShutdownHandler) WaitUntilSignal()
Click to show internal directories.
Click to hide internal directories.