shadow

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const OFF = false
View Source
const ON = true

Variables

View Source
var (
	UnknownDeviceErr = errors.New("unknown device")
	DeviceRepeatErr  = errors.New("device already exists")
)

Functions

This section is empty.

Types

type Device

type Device struct {
	Name string
	// contains filtered or unexported fields
}

func NewDevice

func NewDevice(name string, ttl time.Duration) Device

type DeviceShadow

type DeviceShadow interface {
	AddDevice(name string, ttl time.Duration) error
	RemoveDevice(name string) error
	GetDevice(name string) (d Device, err error)
	GetStatus(name string) (online bool, err error)
	RefreshUpdateAt(name string) (err error)
	OnlineChangeCallback(func(name string, online bool))
	OnlineDevice() (sn []string)
	Destroy()
}

func Of

func Of() DeviceShadow

Jump to

Keyboard shortcuts

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