Documentation
¶
Overview ¶
Package power reports the host's power state so lerd can back off work that is cheap on mains and expensive on a laptop running from its battery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State int
State is how the host is currently powered, ordered by how much lerd should hold back.
const ( // Mains is plugged in with no energy-saving mode engaged. Mains State = iota // Battery is running from the battery. Battery // LowPower is an explicit user request to conserve energy (macOS Low Power // Mode, the power-saver profile on Linux). It outranks Battery: the // setting can be switched on while plugged in, and when it is, the user has // asked for less background work regardless of the power source. LowPower )
Click to show internal directories.
Click to hide internal directories.