Documentation
¶
Overview ¶
Package gracefully_shutdown implements the application shutdown
Index ¶
Constants ¶
View Source
const ( //GRACEFULLY_SHUTDOWN_TIMER receives a timeout to wait for current requests get finished GRACEFULLY_SHUTDOWN_TIMER = "GRACEFULLY_SHUTDOWN_TIMER" //FALLBACK_GRACEFULLY_SHUTDOWN sets a timeout fallback value to set if GRACEFULLY_SHUTDOWN_TIMER is not set FALLBACK_GRACEFULLY_SHUTDOWN = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GracefullyShutdownInterface ¶
type GracefullyShutdownInterface interface { GracefullyShutdownRun( handler http.Handler, addr string, logger logger.Logger, chanError chan<- error, ) }
GracefullyShutdownInterface declare gracefully_shutdown functions
func NewGracefullyShutdownInterface ¶
func NewGracefullyShutdownInterface() GracefullyShutdownInterface
NewGracefullyShutdownInterface returns a instance of gracefully_shutdown interface, so you can call GracefullyShutdownRun with this instance
Click to show internal directories.
Click to hide internal directories.