sleep

package
v0.0.0-...-2dfb075 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifySleep

func NotifySleep()

NotifySleep sends EventSleep to event channel

func NotifyWake

func NotifyWake()

NotifyWake sends EventWakeup to event channel

Types

type Event

type Event int

Event represents sleep event triggered by underlying OS

const (
	// AppTopicSleepNotification represents sleep management Event notification
	AppTopicSleepNotification = "sleep_notification"

	// EventWakeup event sent to node after OS wakes up from sleep
	EventWakeup Event = iota
	// EventSleep event sent to node after OS goes to sleep
	EventSleep
)

type Notifier

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

Notifier represents sleep event notifier structure

func NewNotifier

func NewNotifier(manager connectionManager, eventbus eventbus.EventBus) *Notifier

NewNotifier create sleep events notifier

func (*Notifier) Start

func (n *Notifier) Start()

Start noop function

func (*Notifier) Stop

func (n *Notifier) Stop()

Stop noop function

func (*Notifier) Subscribe

func (n *Notifier) Subscribe()

Subscribe subscribes to sleep notifications

Jump to

Keyboard shortcuts

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