Documentation
¶
Overview ¶
Package power holds one serialized native idle-sleep request while the Node's power setting is on and the Node has running work.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
Backend is the system's idle-sleep request. Acquire and Release return the system's error code, 0 for success.
func Unsupported ¶
func Unsupported() Backend
Unsupported is the backend of a system without an idle-sleep request.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service keeps the system awake while the setting is on and work is held.
func New ¶
New creates the service over the system's request; failed receives the first system error.
func WithBackend ¶
WithBackend creates the service over backend.
func (*Service) Apply ¶
func (s *Service) Apply(settings protocol.PowerSettings)
Apply takes the saved settings. Replayed durable results and delayed readers cannot restore an older policy.