node

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeAPI

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

func New

func New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin, bus busTY.Plugin) *NodeAPI

func (*NodeAPI) Delete

func (n *NodeAPI) Delete(IDs []string) (int64, error)

Delete node

func (*NodeAPI) Get

func (n *NodeAPI) Get(filters []storageTY.Filter) (nodeTY.Node, error)

Get returns a Node

func (*NodeAPI) GetByGatewayAndNodeID

func (n *NodeAPI) GetByGatewayAndNodeID(gatewayID, nodeID string) (*nodeTY.Node, error)

GetByGatewayAndNodeID returns a node details by gatewayID and nodeId of a message

func (*NodeAPI) GetByID

func (n *NodeAPI) GetByID(id string) (*nodeTY.Node, error)

GetByID returns a node details by id

func (*NodeAPI) GetByIDs

func (n *NodeAPI) GetByIDs(ids []string) ([]nodeTY.Node, error)

GetByIDs returns a node details by id

func (*NodeAPI) GetEntityInterface

func (n *NodeAPI) GetEntityInterface() interface{}

func (*NodeAPI) Import

func (n *NodeAPI) Import(data interface{}) error

func (*NodeAPI) List

func (n *NodeAPI) List(filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)

List by filter and pagination

func (*NodeAPI) Save

func (n *NodeAPI) Save(node *nodeTY.Node, publishEvent bool) error

Save Node config into disk

func (*NodeAPI) UpdateFirmwareState

func (n *NodeAPI) UpdateFirmwareState(id string, data map[string]interface{}) error

UpdateFirmwareState func

func (*NodeAPI) VerifyNodeUpStatus

func (n *NodeAPI) VerifyNodeUpStatus(inactiveDuration time.Duration)

Verifies node up status by checking the last seen timestamp if the last seen greater than x minutes/seconds or specified duration in that node will be marked as down

Jump to

Keyboard shortcuts

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