daemon

package
v0.0.0-...-13dad8c Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commander

type Commander struct {
	Options *framework.CmdOptions
	// contains filtered or unexported fields
}

Commander is the main controller of all background goroutines

func NewCommander

func NewCommander() *Commander

NewCommander creates a Commander instance which can be used to query and control all background processes. e.g: Temperature logger, temperature monitor

func (*Commander) DisableLights

func (o *Commander) DisableLights() error

func (*Commander) DisableTemperatureLogging

func (o *Commander) DisableTemperatureLogging() error

func (*Commander) EnableTemperatureLogging

func (o *Commander) EnableTemperatureLogging() error

func (*Commander) GetGrillLights

func (o *Commander) GetGrillLights(params *lights.GetGrillLightsParams) (*models.LightStrip, error)

func (*Commander) GetName

func (o *Commander) GetName() string

GetName returns a human readable name for this background task

func (*Commander) GetStrip

func (o *Commander) GetStrip() hardware.WS2801

func (*Commander) IsRunning

func (o *Commander) IsRunning() bool

IsRunning returns the internal state representing if the main loop is running or not.

func (*Commander) ShutdownSystem

func (o *Commander) ShutdownSystem(params *system.ShutdownParams) (*models.Shutdown, error)

func (*Commander) StartBackground

func (o *Commander) StartBackground() error

startBackground starts the main loop of the runner resulting the the given tickableIFC being executed on the default Ticker schedule

func (*Commander) StopBackground

func (o *Commander) StopBackground() error

StopBackground causes the background goroutine to exit

func (*Commander) UpdateGrillLights

func (o *Commander) UpdateGrillLights(params *lights.UpdateGrillLightsParams) (bool, error)

type LightShow

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

type RunnableIFC

type RunnableIFC interface {
	// StartBackground starts the runnable in a goroutine
	StartBackground() error
	// StopBackground stops the background goroutine
	StopBackground() error
	// IsRunning determines if the main loop is executing
	IsRunning() bool
}

RunnableIFC objects are executed in the background by a runner

Jump to

Keyboard shortcuts

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