manager

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.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 DeviceLock

type DeviceLock struct {
	Device  device.Device
	AppName string
}

type Devices

type Devices interface {
	Devices() ([]device.Device, error)
	SendAction(dev device.Device, a action.Interface) error
	// UnlockDevice(s Session) error
	// LockDevice(s Session, properties *device.Properties) (*DeviceLock, error)
	//GetDevice(id uint) (device.Device, error)
	GetDevice(id string) device.Device
	Start(getDevice device.Device) error
	Stop(getDevice device.Device) error
	AddHandler(handler device.Handler)
	Run(ctx context.Context) error
	StopObserver()
	FindDevice(params *app.Parameter) device.Device
	RegisterDevice(data device.RegisterData) (device.Device, error)
}

type Session

type Session interface {
	GetSessionID() string
	SetDeviceLock(lock *DeviceLock)
	GetDeviceLock() *DeviceLock
	GetDevice() device.Device
	WaitForConnection() error
	GetLastAccess() time.Time
	SetLastAccess(now time.Time)
	GetAppParameter() *app.Parameter
	Close() error
	GetStorage() Storage
	GetLogger() *logrus.Entry
	HandleDisconnect()
}

type Sessions

type Sessions interface {
	GetSession(sessionID string) (Session, error)
	CreateNewSession(logger *logrus.Entry, properties *device.Properties, parameter *app.Parameter) Session
	AddSession(s Session)
	StopSession(s Session) error
	Run(ctx context.Context)
	GetSessions() []Session
	GetSessionDetails(sessionID string) Session
}

type Storage

type Storage interface {
	StoreSceneGraph(data []byte) (string, error)
	StoreImage(content []byte) (string, error)
	Close() error
}

Jump to

Keyboard shortcuts

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