Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destructor ¶
type Destructor func()
type Shutdown ¶ added in v0.2.0
type Shutdown struct { Destructor Destructor *log.Logger // contains filtered or unexported fields }
Shutdown listens for SIGINT and SIGTERM and executes the Destructor
func New ¶ added in v0.2.0
func New(destruct Destructor) *Shutdown
New generates a new Shutdown with typical defaults
func (*Shutdown) Handler ¶ added in v0.7.0
wraps any request and checks to make sure that the server isn't shutting down
func (*Shutdown) SetDestructor ¶ added in v0.7.0
func (shutdown *Shutdown) SetDestructor(destruct Destructor)