devmgr

package
v0.0.0-...-f8e79a6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevMgr

type DevMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, devs []*controller.Controller, mon *monitor.Monitor) *DevMgr

New returns a new device manager which will scan for devices until context is done.

func (*DevMgr) AllOnlineDevices

func (dm *DevMgr) AllOnlineDevices() []string

AllOnlineDevices returns all devices we know about which are online.

func (*DevMgr) Device

func (dm *DevMgr) Device(id string) (*controller.Controller, bool)

Device returns the device controller of the given id.

func (*DevMgr) NameById

func (dm *DevMgr) NameById(id string) (string, bool)

NameById returns the device name by the given id.

Jump to

Keyboard shortcuts

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