node

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

README

NODE Plugin

Documentation

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "node"
	// TopicPluginNode ...
	TopicPluginNode = "system/plugins/node"

	Version = "0.0.1"
)
View Source
const (
	// AttrThread ...
	AttrThread = "thread"
	// AttrRps ...
	AttrRps = "rps"
	// AttrMin ...
	AttrMin = "min"
	// AttrMax ...
	AttrMax = "max"
	// AttrLatency ...
	AttrLatency = "latency"
	// AttrStartedAt ...
	AttrStartedAt = "started_at"
	// AttrNodeLogin ...
	AttrNodeLogin = "node_login"
	// AttrNodePass ...
	AttrNodePass = "node_pass"
)

Variables

Functions

func New

func New() supervisor.Pluggable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

func NewStates

func NewStates() (states map[string]supervisor.ActorState)

NewStates ...

Types

type Actor

type Actor struct {
	*supervisor.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	service supervisor.Service,
	mqttClient mqtt.MqttCli) (actor *Actor)

NewActor ...

func (*Actor) Destroy added in v0.12.0

func (e *Actor) Destroy()

func (*Actor) Spawn

func (e *Actor) Spawn()

Spawn ...

type DeviceType

type DeviceType string

DeviceType ...

type MessageRequest

type MessageRequest struct {
	EntityId   common.EntityId `json:"entity_id"`
	DeviceType DeviceType      `json:"device_type"`
	Properties json.RawMessage `json:"properties"`
	Command    json.RawMessage `json:"command"`
}

MessageRequest ...

type MessageResponse

type MessageResponse struct {
	EntityId   common.EntityId `json:"entity_id"`
	DeviceType DeviceType      `json:"device_type"`
	Properties json.RawMessage `json:"properties"`
	Response   json.RawMessage `json:"response"`
	Status     string          `json:"status"`
}

MessageResponse ...

type MessageStatus

type MessageStatus struct {
	Status    string    `json:"status"`
	Thread    int       `json:"thread"`
	Rps       int64     `json:"rps"`
	Min       int64     `json:"min"`
	Max       int64     `json:"max"`
	Laatency  int64     `json:"latency"`
	StartedAt time.Time `json:"started_at"`
}

MessageStatus ...

type MqttMessage

type MqttMessage struct {
	Dup      bool
	Qos      uint8
	Retained bool
	Topic    string
	PacketID uint16
	Payload  []byte
}

MqttMessage ...

Jump to

Keyboard shortcuts

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