plugin

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback struct {
	Event Event
	Value interface{}
}

type Event

type Event int

Event defines the type of notification from controller to plugins

const (
	EvtKeyboardFn Event = iota
	EvtACPISuspend
	EvtACPIResume
	EvtChargerPluggedIn
	EvtChargerUnplugged
	EvtSentinelCycleThermalProfile
	EvtSentinelUtilityKey
	EvtSentinelEnableGPU
	EvtSentinelDisableGPU
	EvtSentinelCycleRefreshRate

	CbPersistConfig
	CbNotifyToast
	CbNotifyClients
)

Define all the possible controller->plugin notifications

func (Event) String

func (e Event) String() string

type Notification

type Notification struct {
	Event Event
	Value interface{}
}

Notification facilitates the hardware event to be sent to plugins

type Plugin

type Plugin interface {
	Initialize() error
	Run(haltCtx context.Context, cb chan<- Callback) <-chan error
	Notify(t Notification)
}

Plugin will receive hardware events from controller

Jump to

Keyboard shortcuts

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