Documentation ¶
Index ¶
- Constants
- func InitMsgProcessor(m map[string]MsgToErr)
- func LinkName(outNode, outPoint, inNode, inPoint string) string
- func NewNode(g IGraph, name string) *node
- type Conf
- type IGraph
- type IGraphElem
- type IGraphMarshall
- type IGraphMarshaller
- type IGraphUnMarshaller
- type IIn
- type ILink
- type IMsg
- type INode
- type IOut
- type IPlugin
- type IPoint
- type ISubGraph
- type LinkConf
- type LinkToBool
- type Msg
- func (m *Msg) Data() any
- func (m *Msg) InNode() INode
- func (m *Msg) InPoint() string
- func (m *Msg) OutNode() string
- func (m *Msg) OutPoint() string
- func (m *Msg) SetInNode(inNode INode)
- func (m *Msg) SetInPoint(inPoint string)
- func (m *Msg) ToJson() ([]byte, *util.Err)
- func (m *Msg) ToM() util.M
- func (m *Msg) Type() TPoint
- type MsgToBoolErr
- type MsgToErr
- type NodeConf
- type NodeStrToAnyErr
- type NodeToAnyBool
- type Option
- type PointConf
- type StrLinkToBool
- type SubConf
- type TPoint
Constants ¶
View Source
const (
TpNone = "none"
)
Variables ¶
This section is empty.
Functions ¶
func InitMsgProcessor ¶
Types ¶
type IGraph ¶
type IGraph interface { Name() string Data() util.M SetData(m util.M) Plugin() IPlugin SetPlugin(plugin IPlugin) Start() *util.Err AddNode(name string) (INode, *util.Err) GetNode(name string) (INode, *util.Err) GetNodeByPath(names ...string) (INode, *util.Err) FindNode(name string) (INode, bool) FindNodes(name string, nodes *[]INode) IterNode(fn func(INode)) AnyNode(fn func(INode) bool) bool Link(outNode, outPoint, inNode, inPoint string) (ILink, *util.Err) IterLink(fn func(ILink)) AnyLink(fn func(ILink) bool) bool AddSubGraph(name string) (ISubGraph, *util.Err) GetSubGraph(graph string) (ISubGraph, *util.Err) IterSubGraph(fn func(ISubGraph)) AnySubGraph(fn func(ISubGraph) bool) bool }
func NewGraphWithConf ¶
type IGraphElem ¶
type IGraphElem interface { Name() string Path() string Comment() string SetComment(c string) Data() util.M SetData(data util.M) Start() *util.Err Enable() *util.Err //即使已可用,也会重复执行 Disable() *util.Err //即使不可用,也会重复执行 SetEnable(enable bool) *util.Err //已经是该状态不会重复执行 Enabled() bool AddBeforeEnable(fn util.BoolToErr) //添加节点切换是否可用之前调用 DelBeforeEnable(fn util.BoolToErr) //移除节点切换是否可用之前调用 AddAfterEnable(fn util.FnBool) //添加节点切换是否可用之后调用 DelAfterEnable(fn util.FnBool) //移除节点切换是否可用之后调用 Graph() IGraph RootGraph() IGraph }
type IGraphMarshall ¶
type IGraphMarshall interface { IGraphMarshaller IGraphUnMarshaller }
type IGraphMarshaller ¶
type IGraphUnMarshaller ¶
type ILink ¶
type INode ¶
type INode interface { IGraphElem HasIn(name string) bool HasOut(name string) bool AddIn(t TPoint, name string) *util.Err AddOut(t TPoint, name string) *util.Err GetIn(name string) (IIn, *util.Err) GetOut(name string) (IOut, *util.Err) Out(name string, m any) *util.Err ProcessData(msg IMsg) *util.Err BindFn(point string, fn MsgToErr) }
type ISubGraph ¶
type LinkToBool ¶
type MsgToErr ¶
func GetMsgProcessor ¶
type NodeToAnyBool ¶
type StrLinkToBool ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.