power

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package power provides experimental power source device helpers.

It is intended to wrap private power source and battery device configuration APIs so tests can simulate AC power, battery-backed operation, and changing host power conditions inside a guest.

The package should remain narrowly focused on configuration and simple state modeling until the runtime behavior is better characterized.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDevice

NewDevice creates a macOS battery power source device backed by a synthetic source.

func NewSource

func NewSource(cfg Config) (pvz.VZMacSyntheticBatterySource, error)

NewSource creates a synthetic battery source with the requested values.

Types

type Config

type Config struct {
	Charge       float64
	Connectivity int64
}

Config describes the synthetic battery state to apply.

Jump to

Keyboard shortcuts

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