gracefully_shutdown

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 10 Imported by: 0

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

Jump to

Keyboard shortcuts

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