Documentation ¶
Overview ¶
Package watchdog implements a simple watchdog timer which dumps a trace of all goroutines to a file, and then ends the program, if the timer reaches its limit.
Index ¶
Constants ¶
View Source
const DefaultDir = "/tmp"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watchdog ¶
type Watchdog struct {
// contains filtered or unexported fields
}
func MakeWatchdog ¶
MakeWatchdog creates and starts running a watchdog timer. If <duration> passes without a reset it writes stack traces to a temporary file determined by dir, prefix. Then it exits the program if exit is set.
Click to show internal directories.
Click to hide internal directories.