package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: May 15, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package shutdown provides graceful shutdown handling for applications.
Config configures shutdown behavior.
DefaultConfig returns sensible defaults.
Handler manages graceful shutdown.
New creates a new shutdown handler.
func (*Handler) Listen ¶
Listen starts listening for shutdown signals.
Returns a context that will be cancelled on shutdown.
Register adds a shutdown hook.
func (*Handler) Trigger ¶
Trigger manually triggers shutdown.
func (*Handler) Wait ¶
Wait blocks until shutdown is complete.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.