Documentation ¶
Overview ¶
Package afkdetect contains code to detect if the user has gone AFK or returned from AFK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrObserverIsNil = errors.New("observer is nil")
)
Errors specific to AFK-detectors.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector interface { // Start makes this detector start listening for OS-specific events to then // trigger AFK-started or AFK-stopped events. // // You need to stop the detector to remove any dangling Goroutines. StartDetecting() error // StopDetecting makes this detector stop listening for OS-specific events by // cleaning up its Goroutines and hooks. StopDetecting() error StartedObs() *chans.PubSub[Started] StoppedObs() *chans.PubSub[Stopped] }
Detector is an AFK-detector.
Click to show internal directories.
Click to hide internal directories.