Documentation
¶
Overview ¶
Package crashdump preserves runtime crash output independently of routine logs.
Index ¶
Constants ¶
const ( CurrentFile = "core.crash.log" PreviousFile = "core.crash.previous.log" MaxReportBytes = 64 * 1024 // VersionPrefix opens every capture file. A body carrying only this, or a // truncated piece of it, records no crash. VersionPrefix = "zaparoo-core@" )
Variables ¶
This section is empty.
Functions ¶
func Stop ¶
func Stop()
Stop releases the runtime's copy of the crash file descriptor.
The service never calls this: capture is meant to outlive shutdown, so the descriptor is held until the process exits. A test binary is the exception. It starts the service repeatedly against t.TempDir() directories, and a retained handle stops Windows removing the directory, which fails the test during cleanup rather than in anything it asserted.
Types ¶
type Report ¶
Report is a bounded view of the retained file, not a replacement for it.
func Start ¶
Start rotates a previous crash before opening fresh runtime-only capture. Call only from the service process, before starting its workers. The runtime retains its own descriptor until process exit, including during shutdown. Native code that exits without Go's fatal handler cannot be captured here.