power

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package power handles poweroff- and reboot-related functionality, including running pre-reboot (Preboot) functions registered with the housekeeping pkg.

As a side-effect of import, log.Fatal is set to power.FailReboot.

Index

Constants

This section is empty.

Variables

View Source
var FatalAction = log.FailAction{
	MsgPfx:     "ERROR, rebooting:",
	Terminator: FailReboot,
}

Defines the action taken on failure, which is to reboot. Importing this package has the side effect of calling log.SetFatalAction() with this.

Functions

func FailReboot

func FailReboot()

Reboot.

func Off

func Off()

func Reboot

func Reboot(success bool)

Not for general use - prefer FailReboot() or RebootSuccess()

func RebootSuccess

func RebootSuccess()

Reboot. If network logging is enabled, first notify logServer that the current stage succeeded.

func StageFinished

func StageFinished()

Logs over network that the current stage (mfg, factory restore) has finished.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL