core

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Close

func Close()

func Open

func Open(cfg broker.Options) error

func Publish

func Publish(topic string, payload []byte) error

Types

type Device

type Device struct {
	Id     string
	Values model.Values
	Status model.Status
}

func NewDevice

func NewDevice(id string) *Device

func (*Device) Assign

func (d *Device) Assign(points map[string]any) error

func (*Device) Refresh

func (d *Device) Refresh() error

type Map

type Map[T any] struct {
	// contains filtered or unexported fields
}
var Devices Map[Device]
var GatewayStatus Map[model.Status] //status
var Projects Map[Project]
var ServerStatus Map[model.Status] //status
var TunnelStatus Map[model.Status] //status

func (*Map[T]) Delete

func (c *Map[T]) Delete(name string)

func (*Map[T]) Load

func (c *Map[T]) Load(name string) *T

func (*Map[T]) Store

func (c *Map[T]) Store(name string, value *T)

type Plugin added in v2.0.2

type Plugin struct {
	Id      string
	Process *os.Process
	Status  model.Status
}

type Project

type Project struct {
	Id      string
	Values  model.Values
	Status  model.Status
	Devices map[string]*Device
}

func NewProject

func NewProject(id string) *Project

func (*Project) Assign

func (p *Project) Assign(points map[string]any) error

func (*Project) Refresh

func (p *Project) Refresh() error

Jump to

Keyboard shortcuts

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