client

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 34 Imported by: 7

Documentation

Overview

Package client contains utilties for creating Simple IoT clients.

A Simple IoT Client contains the logic for nodes described in the Simple IoT graph store. Examples of built in clients include: Modbus, 1-wire, Upstream, etc.

A client Manager is used to watch the Simple IoT store and create and update new clients as they are created and modified.

See Client and NewManager for ideas on how to get started with your own client.

This package also contains a number of utility functions for interacting with the Simple IoT NATS API.

Index

Examples

Constants

This section is empty.

Variables

View Source
var ErrCobsDecodeError = errors.New("COBS decode error")

ErrCobsDecodeError indicates we got an error decoding a COBS packet

View Source
var ErrCobsLeftoverBufferFull = errors.New("COBS leftover buffer too full")

ErrCobsLeftoverBufferFull indicates our leftover buffer is too full to process

View Source
var ErrCobsTooMuchData = errors.New("COBS decode: too much data without null")

ErrCobsTooMuchData indicates we received too much data without a null in it to delineate packets

Functions

func DecodeEdgePointsMsg

func DecodeEdgePointsMsg(msg *nats.Msg) (string, string, []data.Point, error)

DecodeEdgePointsMsg decodes NATS message into node ID and points

func DecodeNodePointsMsg

func DecodeNodePointsMsg(msg *nats.Msg) (string, []data.Point, error)

DecodeNodePointsMsg decodes NATS message into node ID and points

func DeleteNode

func DeleteNode(nc *nats.Conn, id, parent string, origin string) error

DeleteNode removes a node from the specified parent node

func Dump

func Dump(nc *nats.Conn, msg *nats.Msg) error

Dump converts displays a NATS message

func DuplicateNode

func DuplicateNode(nc *nats.Conn, id, newParent, origin string) error

DuplicateNode is used to Duplicate a node and all its children

func EdgeConnect

func EdgeConnect(eo EdgeOptions) (*nats.Conn, error)

EdgeConnect is a function that attempts connections for edge devices with appropriate timeouts, backups, etc. Currently set to disconnect if we don't have a connection after 6m, and then exp backup to try to connect every 6m after that.

func ExpBackoff

func ExpBackoff(attempts int, max time.Duration) time.Duration

ExpBackoff calculates an exponential time backup to max duration + a random fraction of 1s

func GetNode

func GetNode(nc *nats.Conn, id, parent string) ([]data.NodeEdge, error)

GetNode over NATS. If id is "root", the root node is fetched. If parent is set to "none", the edge details are not included and the hash is calculated without the edge points. returns data.ErrDocumentNotFound if node is not found. If parent is set to "all", then all living instances of the node are returned.

func GetNodeChildren

func GetNodeChildren(nc *nats.Conn, id, typ string, includeDel bool, recursive bool) ([]data.NodeEdge, error)

GetNodeChildren over NATS deleted nodes are skipped unless includeDel is set to true. typ can be used to limit nodes to a particular type, otherwise, all nodes are returned.

func GetNodeChildrenType added in v0.4.0

func GetNodeChildrenType[T any](nc *nats.Conn, id string) ([]T, error)

GetNodeChildrenType get immediate children of a custom type deleted nodes are skipped

func GetNodeType added in v0.4.0

func GetNodeType[T any](nc *nats.Conn, id, parent string) ([]T, error)

GetNodeType gets node of a custom type. If parent is set to "none", the edge details are not included returns data.ErrDocumentNotFound if node is not found. If parent is set to "all", then all living instances of the node are returned.

func GetNodesForUser

func GetNodesForUser(nc *nats.Conn, userID string) ([]data.NodeEdge, error)

GetNodesForUser gets all nodes for a user

func ListenForFile

func ListenForFile(nc *nats.Conn, dir, deviceID string, callback func(path string)) error

ListenForFile listens for a file sent from server. dir is the directly to place downloaded files.

func Log added in v0.5.2

func Log(natsServer, authToken string)

Log all nats messages. This function does not block and does not clean up after itself.

func MirrorNode

func MirrorNode(nc *nats.Conn, id, newParent, origin string) error

MirrorNode adds a an existing node to a new parent. A node can have multiple parents.

func MoveNode

func MoveNode(nc *nats.Conn, id, oldParent, newParent, origin string) error

MoveNode moves a node from one parent to another

func NatsSendFileFromHTTP added in v0.5.1

func NatsSendFileFromHTTP(nc *nats.Conn, deviceID string, url string, callback func(int)) error

NatsSendFileFromHTTP fetchs a file using http and sends via nats. Callback provides % complete (0-100).

func NodeWatcher added in v0.4.0

func NodeWatcher[T any](nc *nats.Conn, id, parent string) (get func() T, stop func(), err error)

NodeWatcher creates a node watcher. update() is called any time there is an update. Stop can be called to stop the watcher. get() can be called to get the current value.

func SendEdgePoint

func SendEdgePoint(nc *nats.Conn, nodeID, parentID string, point data.Point, ack bool) error

SendEdgePoint sends a edge point using the nats protocol

func SendEdgePoints

func SendEdgePoints(nc *nats.Conn, nodeID, parentID string, points data.Points, ack bool) error

SendEdgePoints sends points using the nats protocol

func SendFile

func SendFile(nc *nats.Conn, deviceID string, reader io.Reader, name string, callback func(int)) error

SendFile can be used to send a file to a device. Callback provides bytes transfered.

func SendNode

func SendNode(nc *nats.Conn, node data.NodeEdge, origin string) error

SendNode is used to send a node to a nats server. Can be used to create nodes.

func SendNodePoint

func SendNodePoint(nc *nats.Conn, nodeID string, point data.Point, ack bool) error

SendNodePoint sends a node point using the nats protocol

func SendNodePoints

func SendNodePoints(nc *nats.Conn, nodeID string, points data.Points, ack bool) error

SendNodePoints sends node points using the nats protocol

func SendNodeType added in v0.4.0

func SendNodeType[T any](nc *nats.Conn, node T, origin string) error

SendNodeType is used to send a node to a nats server. Can be used to create nodes.

func SendPoints added in v0.4.0

func SendPoints(nc *nats.Conn, subject string, points data.Points, ack bool) error

SendPoints sends points to specified subject

func SerialDecode added in v0.4.0

func SerialDecode(d []byte) (byte, string, data.Points, error)

SerialDecode can be used to decode serial data in a client.

func SerialEncode added in v0.4.0

func SerialEncode(seq byte, subject string, points data.Points) ([]byte, error)

SerialEncode can be used in a client to encode points sent over a serial link.

func String

func String(nc *nats.Conn, msg *nats.Msg) (string, error)

String converts a NATS message to a string

func SubjectEdgeAllPoints

func SubjectEdgeAllPoints() string

SubjectEdgeAllPoints provides subject for all edge points for any node

func SubjectEdgePoints

func SubjectEdgePoints(nodeID, parentID string) string

SubjectEdgePoints constructs a NATS subject for edge points

func SubjectNodeAllPoints

func SubjectNodeAllPoints() string

SubjectNodeAllPoints provides subject for all points for any node

func SubjectNodeHRPoints added in v0.5.1

func SubjectNodeHRPoints(nodeID string) string

SubjectNodeHRPoints constructs a NATS subject for high rate node points

func SubjectNodePoints

func SubjectNodePoints(nodeID string) string

SubjectNodePoints constructs a NATS subject for node points

func SubscribeEdgePoints added in v0.4.0

func SubscribeEdgePoints(nc *nats.Conn, id, parent string, callback func(points []data.Point)) (stop func(), err error)

SubscribeEdgePoints subscripts to edge point updates for a node and executes a callback when new points arrive. stop() can be called to clean up the subscription

func SubscribePoints added in v0.4.0

func SubscribePoints(nc *nats.Conn, id string, callback func(points []data.Point)) (stop func(), err error)

SubscribePoints subscripts to point updates for a node and executes a callback when new points arrive. stop() can be called to clean up the subscription

func UserCheck

func UserCheck(nc *nats.Conn, email, pass string) ([]data.NodeEdge, error)

UserCheck sends a nats message to check auth of user This function returns user nodes and a JWT node which includes a token

Types

type Action added in v0.5.0

type Action struct {
	ID          string `node:"id"`
	Parent      string `node:"parent"`
	Description string `point:"description"`
	Active      bool   `point:"active"`
	// Action: notify, setValue, playAudio
	Action    string `point:"action"`
	NodeID    string `point:"nodeID"`
	PointType string `point:"pointType"`
	// PointType: number, text, onOff
	ValueType string  `point:"valueType"`
	Value     float64 `point:"value"`
	ValueText string  `point:"valueText"`
	// the following are used for audio playback
	PointChannel  int    `point:"pointChannel"`
	PointDevice   string `point:"pointDevice"`
	PointFilePath string `point:"pointFilePath"`
}

Action defines actions that can be taken if a rule is active.

func (Action) String added in v0.5.0

func (a Action) String() string

type ActionInactive added in v0.5.0

type ActionInactive struct {
	ID          string `node:"id"`
	Parent      string `node:"parent"`
	Description string `point:"description"`
	Active      bool   `point:"active"`
	// Action: notify, setValue, playAudio
	Action    string `point:"action"`
	NodeID    string `point:"nodeID"`
	PointType string `point:"pointType"`
	// PointType: number, text, onOff
	ValueType string  `point:"valueType"`
	Value     float64 `point:"value"`
	ValueText string  `point:"valueText"`
	// the following are used for audio playback
	PointChannel  int    `point:"pointChannel"`
	PointDevice   string `point:"pointDevice"`
	PointFilePath string `point:"pointFilePath"`
}

ActionInactive defines actions that can be taken if a rule is inactive. this is defined for use with the client.SendNodeType API

type Client

type Client interface {
	StartStop

	Points(string, []data.Point)
	EdgePoints(string, string, []data.Point)
}

Client interface describes methods a Simple Iot client must implement. This is to be kept as simple as possible, and the ClientManager does all the heavy lifting of interacting with the rest of the SIOT system. Start should block until Stop is called. Start MUST return when Stop is called. Stop does not block -- wait until Start returns if you need to know the client is stopped. Points and EdgePoints are called when there are updates to the client node. The client Manager filters out all points with Origin set to "" because it assumes the point was generated by the client and the client already knows about it. Thus, if you want points to get to a client, Origin must be set.

func NewDbClient added in v0.5.0

func NewDbClient(nc *nats.Conn, config Db) Client

NewDbClient ...

func NewRuleClient added in v0.5.0

func NewRuleClient(nc *nats.Conn, config Rule) Client

NewRuleClient ...

func NewSerialDevClient added in v0.4.0

func NewSerialDevClient(nc *nats.Conn, config SerialDev) Client

NewSerialDevClient ...

func NewSignalGeneratorClient added in v0.5.1

func NewSignalGeneratorClient(nc *nats.Conn, config SignalGenerator) Client

NewSignalGeneratorClient ...

type CobsWrapper added in v0.4.0

type CobsWrapper struct {
	// contains filtered or unexported fields
}

CobsWrapper can be used to wrap an io.ReadWriteCloser to COBS encode/decode data

func NewCobsWrapper added in v0.4.0

func NewCobsWrapper(dev io.ReadWriteCloser, maxMessageLength int) *CobsWrapper

NewCobsWrapper creates a new cobs wrapper

func (*CobsWrapper) Close added in v0.4.0

func (cw *CobsWrapper) Close() error

Close the device wrapped.

func (*CobsWrapper) Read added in v0.4.0

func (cw *CobsWrapper) Read(b []byte) (int, error)

Read a COBS encoded data stream. The stream may optionally start with one or more NULL bytes and must end with a NULL byte. This Read blocks until we get an entire packet or an error.

func (*CobsWrapper) SetDebug added in v0.5.3

func (cw *CobsWrapper) SetDebug(debug int)

SetDebug sets the debug level. If >= 9, then it dumps the raw data received.

func (*CobsWrapper) Write added in v0.4.0

func (cw *CobsWrapper) Write(b []byte) (int, error)

type Condition added in v0.5.0

type Condition struct {
	// general parameters
	ID            string  `node:"id"`
	Parent        string  `node:"parent"`
	Description   string  `point:"description"`
	ConditionType string  `point:"conditionType"`
	MinActive     float64 `point:"minActive"`
	Active        bool    `point:"active"`

	// used with point value rules
	NodeID     string  `point:"nodeID"`
	PointType  string  `point:"pointType"`
	PointKey   string  `point:"pointKey"`
	PointIndex int     `point:"pointIndex"`
	ValueType  string  `point:"valueType"`
	Operator   string  `point:"operator"`
	Value      float64 `point:"value"`
	ValueText  string  `point:"valueText"`

	// used with shedule rules
	StartTime string `point:"startTime"`
	EndTime   string `point:"endTime"`
	Weekdays  []time.Weekday
}

Condition defines parameters to look for in a point or a schedule.

func (Condition) String added in v0.5.0

func (c Condition) String() string

type Db added in v0.5.0

type Db struct {
	ID          string `node:"id"`
	Parent      string `node:"parent"`
	Description string `point:"description"`
	URI         string `point:"uri"`
	Org         string `point:"org"`
	Bucket      string `point:"bucket"`
	AuthToken   string `point:"authToken"`
}

Db represents the configuration for a SIOT DB client

type DbClient added in v0.5.0

type DbClient struct {
	// contains filtered or unexported fields
}

DbClient is a SIOT database client

func (*DbClient) EdgePoints added in v0.5.0

func (dbc *DbClient) EdgePoints(nodeID, parentID string, points []data.Point)

EdgePoints is called by the Manager when new edge points for this node are received.

func (*DbClient) Points added in v0.5.0

func (dbc *DbClient) Points(nodeID string, points []data.Point)

Points is called by the Manager when new points for this node are received.

func (*DbClient) Start added in v0.5.0

func (dbc *DbClient) Start() error

Start runs the main logic for this client and blocks until stopped

func (*DbClient) Stop added in v0.5.0

func (dbc *DbClient) Stop(err error)

Stop sends a signal to the Start function to exit

type EdgeOptions

type EdgeOptions struct {
	URI          string
	AuthToken    string
	NoEcho       bool
	Disconnected func()
	Reconnected  func()
	Closed       func()
}

EdgeOptions describes options for connecting edge devices

type Group added in v0.5.2

type Group struct {
	// contains filtered or unexported fields
}

Group is used to group a list of clients and start/stop them currently a thin wrapper around run.Group

func DefaultClients added in v0.5.2

func DefaultClients(nc *nats.Conn) (*Group, error)

DefaultClients returns an actor for the default group of built in clients

func NewGroup added in v0.5.2

func NewGroup() *Group

NewGroup creates a new client group

func (*Group) Add added in v0.5.2

func (g *Group) Add(client StartStop)

Add client to group

func (*Group) Start added in v0.5.2

func (g *Group) Start() error

Start clients. This function blocks until error or stopped. all clients must be added before runner is started

func (*Group) Stop added in v0.5.2

func (g *Group) Stop(err error)

Stop clients

type Manager

type Manager[T any] struct {
	// contains filtered or unexported fields
}

Manager manages a node type, watches for changes, adds/removes instances that get added/deleted

func NewManager

func NewManager[T any](nc *nats.Conn,
	construct func(nc *nats.Conn, config T) Client) *Manager[T]

NewManager takes constructor for a node client and returns a Manager for that client The Node Type is inferred from the Go type passed in, so you must name Go client Types to manage the node type definitions.

Example
package main

import (
	"log"

	"github.com/nats-io/nats.go"
	"github.com/simpleiot/simpleiot/client"
	"github.com/simpleiot/simpleiot/data"
	"github.com/simpleiot/simpleiot/server"
)

// exNode is decoded data from the client node
type exNode struct {
	ID          string `node:"id"`
	Parent      string `node:"parent"`
	Description string `point:"description"`
	Port        int    `point:"port"`
	Role        string `edgepoint:"role"`
}

// exNodeClient contains the logic for this client
type exNodeClient struct {
	nc            *nats.Conn
	config        testNode
	stop          chan struct{}
	stopped       chan struct{}
	newPoints     chan client.NewPoints
	newEdgePoints chan client.NewPoints
	chGetConfig   chan chan testNode
}

// newExNodeClient is passed to the NewManager() function call -- when
// a new node is detected, the Manager will call this function to construct
// a new client.
func newExNodeClient(nc *nats.Conn, config testNode) client.Client {
	return &exNodeClient{
		nc:            nc,
		config:        config,
		stop:          make(chan struct{}),
		newPoints:     make(chan client.NewPoints),
		newEdgePoints: make(chan client.NewPoints),
	}
}

// Start runs the main logic for this client and blocks until stopped
func (tnc *exNodeClient) Start() error {
	for {
		select {
		case <-tnc.stop:
			close(tnc.stopped)
			return nil
		case pts := <-tnc.newPoints:
			err := data.MergePoints(pts.ID, pts.Points, &tnc.config)
			if err != nil {
				log.Println("error merging new points: ", err)
			}
			log.Printf("New config: %+v\n", tnc.config)
		case pts := <-tnc.newEdgePoints:
			err := data.MergeEdgePoints(pts.ID, pts.Parent, pts.Points, &tnc.config)
			if err != nil {
				log.Println("error merging new points: ", err)
			}
		case ch := <-tnc.chGetConfig:
			ch <- tnc.config
		}
	}
}

// Stop sends a signal to the Start function to exit
func (tnc *exNodeClient) Stop(err error) {
	close(tnc.stop)
}

// Points is called by the Manager when new points for this
// node are received.
func (tnc *exNodeClient) Points(id string, points []data.Point) {
	tnc.newPoints <- client.NewPoints{id, "", points}
}

// EdgePoints is called by the Manager when new edge points for this
// node are received.
func (tnc *exNodeClient) EdgePoints(id, parent string, points []data.Point) {
	tnc.newEdgePoints <- client.NewPoints{id, parent, points}
}

func main() {
	nc, root, stop, err := server.TestServer()

	if err != nil {
		log.Println("Error starting test server: ", err)
	}

	defer stop()

	testConfig := testNode{"", "", "fancy test node", 8080, "admin"}

	// Convert our custom struct to a data.NodeEdge struct
	ne, err := data.Encode(testConfig)
	if err != nil {
		log.Println("Error encoding node: ", err)
	}

	ne.Parent = root.ID

	// hydrate database with test node
	err = client.SendNode(nc, ne, "test")

	if err != nil {
		log.Println("Error sending node: ", err)
	}

	// Create a new manager for nodes of type "testNode". The manager looks for new nodes under the
	// root and if it finds any, it instantiates a new client, and sends point updates to it
	m := client.NewManager(nc, newExNodeClient)
	m.Start()

	// Now any updates to the node will trigger Points/EdgePoints callbacks in the above client
}

func (*Manager[T]) Start

func (m *Manager[T]) Start() error

Start node manager. This function looks for children of a certain node type. When new nodes are found, the data is decoded into the client type config, and the constructor for the node client is called. This call blocks until Stop is called.

func (*Manager[T]) Stop

func (m *Manager[T]) Stop(err error)

Stop manager. This also stops all registered clients and causes Start to exit.

type Metric

type Metric struct {
	// contains filtered or unexported fields
}

Metric is a type that can be used to track metrics and periodically report them to a node point. Data is queued and averaged and then the average is sent out as a point.

func NewMetric

func NewMetric(nc *nats.Conn, nodeID, pointType string, reportPeriod time.Duration) *Metric

NewMetric creates a new metric

func (*Metric) AddSample

func (m *Metric) AddSample(s float64) error

AddSample adds a sample and reports it if reportPeriod has expired

func (*Metric) SetNodeID

func (m *Metric) SetNodeID(id string)

SetNodeID -- this is a bit of a hack to get around some init issues

type NewPoints added in v0.5.0

type NewPoints struct {
	ID     string
	Parent string
	Points data.Points
}

NewPoints is used to pass new points through channels in client drivers

func (NewPoints) String added in v0.5.0

func (np NewPoints) String() string

type Rule added in v0.5.0

type Rule struct {
	ID              string      `node:"id"`
	Parent          string      `node:"parent"`
	Description     string      `point:"description"`
	Disable         bool        `point:"disable"`
	Active          bool        `point:"active"`
	Conditions      []Condition `child:"condition"`
	Actions         []Action    `child:"action"`
	ActionsInactive []Action    `child:"actionInactive"`
}

Rule represent a rule node config

func (Rule) String added in v0.5.0

func (r Rule) String() string

type RuleClient added in v0.5.0

type RuleClient struct {
	// contains filtered or unexported fields
}

RuleClient is a SIOT client used to run rules

func (*RuleClient) EdgePoints added in v0.5.0

func (rc *RuleClient) EdgePoints(nodeID, parentID string, points []data.Point)

EdgePoints is called by the Manager when new edge points for this node are received.

func (*RuleClient) Points added in v0.5.0

func (rc *RuleClient) Points(nodeID string, points []data.Point)

Points is called by the Manager when new points for this node are received.

func (*RuleClient) Start added in v0.5.0

func (rc *RuleClient) Start() error

Start runs the main logic for this client and blocks until stopped

func (*RuleClient) Stop added in v0.5.0

func (rc *RuleClient) Stop(err error)

Stop sends a signal to the Start function to exit

type SerialDev added in v0.4.0

type SerialDev struct {
	ID               string `node:"id"`
	Parent           string `node:"parent"`
	Description      string `point:"description"`
	Port             string `point:"port"`
	Baud             string `point:"baud"`
	MaxMessageLength int    `point:"maxMessageLength"`
	Debug            int    `point:"debug"`
	Disable          bool   `point:"disable"`
	Log              string `point:"log"`
	Rx               int    `point:"rx"`
	RxReset          bool   `point:"rxReset"`
	Tx               int    `point:"tx"`
	TxReset          bool   `point:"txReset"`
	Uptime           int    `point:"uptime"`
	ErrorCount       int    `point:"errorCount"`
	ErrorCountReset  bool   `point:"errorCountReset"`
}

SerialDev represents a serial (MCU) config

type SerialDevClient added in v0.4.0

type SerialDevClient struct {
	// contains filtered or unexported fields
}

SerialDevClient is a SIOT client used to manage serial devices

func (*SerialDevClient) EdgePoints added in v0.4.0

func (sd *SerialDevClient) EdgePoints(nodeID, parentID string, points []data.Point)

EdgePoints is called by the Manager when new edge points for this node are received.

func (*SerialDevClient) Points added in v0.4.0

func (sd *SerialDevClient) Points(nodeID string, points []data.Point)

Points is called by the Manager when new points for this node are received.

func (*SerialDevClient) Start added in v0.4.0

func (sd *SerialDevClient) Start() error

Start runs the main logic for this client and blocks until stopped

func (*SerialDevClient) Stop added in v0.4.0

func (sd *SerialDevClient) Stop(err error)

Stop sends a signal to the Start function to exit

type SignalGenerator added in v0.5.1

type SignalGenerator struct {
	ID          string  `node:"id"`
	Parent      string  `node:"parent"`
	Description string  `point:"description"`
	Frequency   float64 `point:"frequency"`
	Amplitude   float64 `point:"amplitude"`
	Offset      float64 `point:"offset"`
	SampleRate  float64 `point:"sampleRate"`
	Value       float64 `point:"value"`
	Units       string  `point:"units"`
	Disable     bool    `point:"disable"`
}

SignalGenerator config

type SignalGeneratorClient added in v0.5.1

type SignalGeneratorClient struct {
	// contains filtered or unexported fields
}

SignalGeneratorClient for signal generator nodes

func (*SignalGeneratorClient) EdgePoints added in v0.5.1

func (sgc *SignalGeneratorClient) EdgePoints(nodeID, parentID string, points []data.Point)

EdgePoints is called by the Manager when new edge points for this node are received.

func (*SignalGeneratorClient) Points added in v0.5.1

func (sgc *SignalGeneratorClient) Points(nodeID string, points []data.Point)

Points is called by the Manager when new points for this node are received.

func (*SignalGeneratorClient) Start added in v0.5.1

func (sgc *SignalGeneratorClient) Start() error

Start runs the main logic for this client and blocks until stopped

func (*SignalGeneratorClient) Stop added in v0.5.1

func (sgc *SignalGeneratorClient) Stop(err error)

Stop sends a signal to the Start function to exit

type StartStop added in v0.5.2

type StartStop interface {
	Start() error
	Stop(error)
}

StartStop is an interface that implements the Start() and Stop() methods. This pattern is used wherever long running processes are required.

type User added in v0.5.1

type User struct {
	ID        string `node:"id"`
	Parent    string `node:"parent"`
	FirstName string `point:"firstName"`
	LastName  string `point:"lastName"`
	Phone     string `point:"phone"`
	Email     string `point:"email"`
	Pass      string `point:"pass"`
}

User represents a user node

type Variable added in v0.5.0

type Variable struct {
	ID           string  `node:"id"`
	Parent       string  `node:"parent"`
	Description  string  `point:"description"`
	VariableType string  `point:"variableType"`
	Value        float64 `point:"value"`
}

Variable represents the config of a variable node type

Jump to

Keyboard shortcuts

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