shutdown

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL