Documentation
¶
Overview ¶
Package power provides power state detection functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LidStateDetector ¶ added in v1.3.0
type LidStateDetector struct {
// contains filtered or unexported fields
}
func NewLidStateDetector ¶ added in v1.3.0
func (*LidStateDetector) GetCurrentState ¶ added in v1.3.0
func (l *LidStateDetector) GetCurrentState() LidState
func (*LidStateDetector) Listen ¶ added in v1.3.0
func (l *LidStateDetector) Listen() <-chan LidEvent
type PowerDetector ¶
type PowerDetector struct {
// contains filtered or unexported fields
}
func NewPowerDetector ¶
func (*PowerDetector) GetCurrentState ¶
func (p *PowerDetector) GetCurrentState() PowerState
func (*PowerDetector) Listen ¶
func (p *PowerDetector) Listen() <-chan PowerEvent
type PowerEvent ¶
type PowerEvent struct {
State PowerState
}
type PowerState ¶
type PowerState int
const ( UnknownPowerState PowerState = iota BatteryPowerState ACPowerState )
func (PowerState) String ¶
func (p PowerState) String() string
Click to show internal directories.
Click to hide internal directories.