Documentation
¶
Overview ¶
Package shutdown tracks daemon-wide graceful shutdown state. The daemon command marks shutdown started when SIGTERM/SIGINT is received; the "ipfs diag healthy" subcommand checks this state for Dockerfile HEALTHCHECK and other monitoring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseWithCtx ¶
CloseWithCtx runs close in a goroutine and returns when it finishes or when ctx is done, whichever comes first. If ctx fires before close returns, the goroutine is leaked intentionally; the process is about to exit, so the leak is bounded by process lifetime. Logs at ERROR which subsystem failed to close in time so operators see it in journal/docker logs.
func MarkStarted ¶
func MarkStarted() bool
MarkStarted records that graceful shutdown has begun. Safe to call multiple times concurrently; only the first call wins. Returns true on the first call, false on subsequent calls.
Types ¶
This section is empty.