flow

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ChainNode

type ChainNode struct {
	//节点配置
	Config ChainNodeConfiguration
}

ChainNode 子规则链 如果找不到规则链,则把消息通过`Failure`关系发送到下一个节点 子规则链所有分支执行完后,把每个结束节点处理的消息合后通过`Success`关系发送到下一个节点。消息格式:[]WrapperMsg

func (*ChainNode) Destroy

func (x *ChainNode) Destroy()

Destroy 销毁

func (*ChainNode) Init

func (x *ChainNode) Init(ruleConfig types.Config, configuration types.Configuration) error

Init 初始化

func (*ChainNode) New

func (x *ChainNode) New() types.Node

func (*ChainNode) OnMsg

func (x *ChainNode) OnMsg(ctx types.RuleContext, msg types.RuleMsg)

OnMsg 处理消息

func (*ChainNode) Type

func (x *ChainNode) Type() string

Type 组件类型

type ChainNodeConfiguration

type ChainNodeConfiguration struct {
	//TargetId 子规则链ID
	TargetId string
}

ChainNodeConfiguration 节点配置

type RefNode added in v0.24.0

type RefNode struct {
	//节点配置
	Config RefNodeConfiguration
	// contains filtered or unexported fields
}

RefNode 引用指定规则链或者当前规则链节点,用于节点复用 格式:[{chainId}]:{nodeId},如果是引入本规则链,则格式为:{nodeId} 执行成功则使用该节点的输出关系发送到下一个节点 如果找不到节点,则把消息通过`Failure`关系发送到下一个节点

func (*RefNode) Destroy added in v0.24.0

func (x *RefNode) Destroy()

Destroy 销毁

func (*RefNode) Init added in v0.24.0

func (x *RefNode) Init(ruleConfig types.Config, configuration types.Configuration) error

Init 初始化

func (*RefNode) New added in v0.24.0

func (x *RefNode) New() types.Node

func (*RefNode) OnMsg added in v0.24.0

func (x *RefNode) OnMsg(ctx types.RuleContext, msg types.RuleMsg)

OnMsg 处理消息

func (*RefNode) Type added in v0.24.0

func (x *RefNode) Type() string

Type 组件类型

type RefNodeConfiguration added in v0.24.0

type RefNodeConfiguration struct {
	//TargetId 节点ID,
	TargetId string
}

RefNodeConfiguration 节点配置

Jump to

Keyboard shortcuts

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