Documentation
¶
Overview ¶
Package watchdog implements control of hardware watchdog devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { // Identity is the name of the watchdog driver. Identity string // contains filtered or unexported fields }
A Device is a hardware watchdog device which can be pinged to keep the system from rebooting once the device has been opened.
func Open ¶
Open opens the primary watchdog device on this system ("/dev/watchdog" on Linux, TBD on other platforms). If the device is not found, an error compatible with os.ErrNotExist will be returned.
Once a Device is opened, you must call Ping repeatedly to keep the system from being rebooted. Call Close to disarm the watchdog device.
func (*Device) Close ¶
Close closes the handle to the watchdog device and attempts to gracefully disarm the device, so no further Ping calls are required to keep the system from rebooting.