preventsleep

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported     = errors.New("preventing system sleep is not supported on this platform")
	ErrNotStarted       = errors.New("caffeinate is not started")
	ErrAlreadyStarted   = errors.New("caffeinate is already started")
	ErrNotRunning       = errors.New("caffeinate is no longer running")
	ErrPermissionDenied = errors.New("permission denied, you must use sudo to perform this operation")
)

Functions

This section is empty.

Types

type Caffeinate

type Caffeinate struct {
	// contains filtered or unexported fields
}

func New

func New() *Caffeinate

func (*Caffeinate) IsRunning

func (c *Caffeinate) IsRunning() bool

func (*Caffeinate) Start

func (c *Caffeinate) Start() error

func (*Caffeinate) Stop

func (c *Caffeinate) Stop() error

Jump to

Keyboard shortcuts

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