pause

package
v0.6.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-2.0 Imports: 5 Imported by: 40

Documentation

Index

Constants

View Source
const (
	EventDevicePaused int = iota
	EventDeviceWake
	EventNetworkPause
	EventNetworkWake
)

Variables

This section is empty.

Functions

func ContextWithDefaultManager deprecated

func ContextWithDefaultManager(ctx context.Context) context.Context

Deprecated: use WithDefaultManager instead.

func ContextWithManager deprecated

func ContextWithManager(ctx context.Context, manager Manager) context.Context

Deprecated: use service.ContextWith instead.

func WithDefaultManager added in v0.3.0

func WithDefaultManager(ctx context.Context) context.Context

Types

type Callback added in v0.3.0

type Callback = func(event int)

type Manager

type Manager interface {
	DevicePause()
	DeviceWake()
	NetworkPause()
	NetworkWake()
	IsDevicePaused() bool
	IsNetworkPaused() bool
	IsPaused() bool
	WaitActive()
	RegisterCallback(callback Callback) *list.Element[Callback]
	UnregisterCallback(element *list.Element[Callback])
}

func ManagerFromContext deprecated

func ManagerFromContext(ctx context.Context) Manager

Deprecated: use service.ContextWith instead.

Jump to

Keyboard shortcuts

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