autoevent

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

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(ctx context.Context, wg *sync.WaitGroup, bufferSize int, dic *di.Container)

NewManager initiates the AutoEvent manager once

Types

type Executor

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

func NewExecutor

func NewExecutor(deviceName string, ae models.AutoEvent) (*Executor, error)

NewExecutor creates an Executor for an AutoEvent

func (*Executor) Run

func (e *Executor) Run(ctx context.Context, wg *sync.WaitGroup, dic *di.Container)

Run triggers this Executor executes the handler for the resource periodically

func (*Executor) Stop

func (e *Executor) Stop()

Stop marks this Executor stopped

type Manager

type Manager interface {
	StartAutoEvents(dic *di.Container) bool
	StopAutoEvents()
	RestartForDevice(deviceName string, dic *di.Container)
	StopForDevice(deviceName string)
}

func GetManager

func GetManager() Manager

GetManager returns Manager instance

Jump to

Keyboard shortcuts

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