keepawake

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package keepawake stops the host from idle-sleeping while long work runs.

On macOS it holds a caffeinate assertion tied to this process's PID, so the assertion ends even if jevkit is killed. Elsewhere it is a no-op. Keeping the machine awake is best effort and never fails the caller.

Index

Constants

View Source
const DisableEnv = "JEVKIT_NO_CAFFEINATE"

DisableEnv turns keep-awake off when set to a non-empty value.

Variables

This section is empty.

Functions

func Hold

func Hold() (release func())

Hold keeps the machine awake until every returned release func has been called. Nested holds share one assertion. Release is safe to call twice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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