nodes

package
v0.0.0-...-d93df49 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RT_TYPE = "CIS"

Variables

This section is empty.

Functions

func NewNetworkReceiver

func NewNetworkReceiver(brokerURL string, topic string, mq mqueue.MessageQueueIFace) runtime.NodeIFace

func NewNetworkSender

func NewNetworkSender(brokerURL string, topic string, mq mqueue.MessageQueueIFace) runtime.NodeIFace

Types

type BasicNode

type BasicNode struct {
	Id globals.UID

	// Pos Position, in DB
	// Ports []int, in DB
	Inputs
	Outputs
	// contains filtered or unexported fields
}

func (*BasicNode) Get

func (*BasicNode) GetActInputCounter

func (bn *BasicNode) GetActInputCounter() *utils.LockedCounter

func (*BasicNode) GetActOutputCounter

func (bn *BasicNode) GetActOutputCounter() *utils.LockedCounter

func (*BasicNode) GetID

func (bn *BasicNode) GetID() globals.UID

func (*BasicNode) GetIdAsString

func (bn *BasicNode) GetIdAsString() string

func (*BasicNode) GetInputPorts

func (bn *BasicNode) GetInputPorts() []db.PortModel

func (*BasicNode) GetLogger

func (bn *BasicNode) GetLogger() utils.LoggerIFace

func (*BasicNode) GetOutputPorts

func (bn *BasicNode) GetOutputPorts() []db.PortModel

func (*BasicNode) GetParentFlow

func (bn *BasicNode) GetParentFlow() *runtime.Flow

GetParentFlow should be used to get the parent flow object

func (*BasicNode) GetType

func (bn *BasicNode) GetType() db.NodeType

func (*BasicNode) Init

func (bn *BasicNode) Init()

func (*BasicNode) IsBusy

func (bn *BasicNode) IsBusy() bool

func (*BasicNode) IsEndNode

func (bn *BasicNode) IsEndNode() bool

func (*BasicNode) IsInited

func (bn *BasicNode) IsInited() bool

func (*BasicNode) IsRef

func (bn *BasicNode) IsRef() bool

func (*BasicNode) IsService

func (bn *BasicNode) IsService() bool

func (*BasicNode) IsStartNode

func (bn *BasicNode) IsStartNode() bool

func (*BasicNode) IsSupervised

func (bn *BasicNode) IsSupervised() bool

func (*BasicNode) MakeService

func (bn *BasicNode) MakeService()

MakeService can be used to modify node so it can be used without passing valid message to it after that nil can be passed instead it should only be used in special cases to see an example check the network receiver node

func (*BasicNode) Mount

func (bn *BasicNode) Mount()

func (*BasicNode) Run

func (*BasicNode) Set

func (bn *BasicNode) Set(message runtime.MessageIFace)

func (*BasicNode) SetBusy

func (bn *BasicNode) SetBusy(value bool)

func (*BasicNode) SetID

func (bn *BasicNode) SetID(id globals.UID)

func (*BasicNode) SetInited

func (bn *BasicNode) SetInited()

func (*BasicNode) SetLogger

func (bn *BasicNode) SetLogger(logger utils.LoggerIFace)

func (*BasicNode) SetParentFlow

func (bn *BasicNode) SetParentFlow(flow *runtime.Flow)

func (*BasicNode) SetSupervised

func (bn *BasicNode) SetSupervised(value bool)

func (*BasicNode) SetType

func (bn *BasicNode) SetType(nType db.NodeType)

func (*BasicNode) Terminate

func (bn *BasicNode) Terminate()

type BitFlag

type BitFlag uint64
const (
	CommandChanged  BitFlag = 1 << iota // 1 (001)
	ScriptChanged                       // 2 (010)
	LogLevelChanged                     // 4 (100)
)

func (*BitFlag) Add

func (bf *BitFlag) Add(value BitFlag)

func (*BitFlag) Has

func (bf *BitFlag) Has(flag BitFlag) bool

func (*BitFlag) Remove

func (bf *BitFlag) Remove(value BitFlag)

type CiprusScriptNode

type CiprusScriptNode struct {
	BasicNode
	// contains filtered or unexported fields
}

func (*CiprusScriptNode) GetPM

func (*CiprusScriptNode) Init

func (csn *CiprusScriptNode) Init()

func (*CiprusScriptNode) Run

func (*CiprusScriptNode) SetConfPath

func (csn *CiprusScriptNode) SetConfPath(path string)

func (*CiprusScriptNode) SetRTCommand

func (csn *CiprusScriptNode) SetRTCommand(cmd string)

func (*CiprusScriptNode) SetRTLogLevel

func (csn *CiprusScriptNode) SetRTLogLevel(logLevel string)

func (*CiprusScriptNode) SetSourcePath

func (csn *CiprusScriptNode) SetSourcePath(sourcePath string)

func (*CiprusScriptNode) Terminate

func (csn *CiprusScriptNode) Terminate()

type FuncNode

type FuncNode struct {
	BasicNode
}

func (*FuncNode) Do

func (*FuncNode) Run

func (fn *FuncNode) Run(runner *runtime.Runner, message runtime.MessageIFace) runtime.MessageIFace

type Inputs

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

func (*Inputs) AddPort

func (ins *Inputs) AddPort(pType db.PortType, label string) *runtime.Port

AddPort should be used to create an input port for node in the Init function of it

func (*Inputs) GetPortByLabel

func (ins *Inputs) GetPortByLabel(label string) *runtime.Port

GetPortByLabel returns an input port identified by its label

func (*Inputs) GetPorts

func (ins *Inputs) GetPorts() []db.PortModel

GetPorts can used to get all the input ports Be aware that it returns the PortModels not the ports the id can be used to get the port object from the flow by accessing its registry object

func (*Inputs) RemovePort

func (ins *Inputs) RemovePort(port *runtime.Port)

RemovePort can be used to remove an input port from node Usually it is not needed as it will be handled by the GC but in some special cases it can useful

func (*Inputs) SetParent

func (in *Inputs) SetParent(pNode *BasicNode)

type NetworkReceiver

type NetworkReceiver struct {
	BasicNode
	// contains filtered or unexported fields
}

func (*NetworkReceiver) Init

func (nr *NetworkReceiver) Init()

func (*NetworkReceiver) Run

func (*NetworkReceiver) SetRecvMessageType

func (nr *NetworkReceiver) SetRecvMessageType(mType runtime.MessageType)

func (*NetworkReceiver) SetSendMessageType

func (nr *NetworkReceiver) SetSendMessageType(mType runtime.MessageType)

type NetworkSender

type NetworkSender struct {
	BasicNode
	// contains filtered or unexported fields
}

func (*NetworkSender) Init

func (ns *NetworkSender) Init()

func (*NetworkSender) Run

func (*NetworkSender) SetSendMessageType

func (ns *NetworkSender) SetSendMessageType(mType runtime.MessageType)

type Outputs

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

func (*Outputs) AddPort

func (outs *Outputs) AddPort(pType db.PortType, label string) *runtime.Port

AddPort should be used to create an output port for node in the Init function of it

func (*Outputs) GetPortByLabel

func (outs *Outputs) GetPortByLabel(label string) *runtime.Port

GetPortByLabel returns an output port identified by its label

func (*Outputs) GetPorts

func (outs *Outputs) GetPorts() []db.PortModel

GetPorts can used to get all the output ports Be aware that it returns the PortModels not the ports the id can be used to get the port object from the flow by accessing its registry object

func (*Outputs) RemovePort

func (outs *Outputs) RemovePort(port *runtime.Port)

RemovePort can be used to remove an output port from node Usually it is not needed as it will be handled by the GC but in some special cases it can useful

func (*Outputs) SetParent

func (outs *Outputs) SetParent(pNode *BasicNode)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳