test

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRuleContext

func NewRuleContext(config types.Config, callback func(msg types.RuleMsg, relationType string)) types.RuleContext

Types

type NodeTestRuleContext

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

NodeTestRuleContext 只为测试单节点,临时创建的上下文 无法把多个节点组成链式 callback 回调处理结果

func (*NodeTestRuleContext) Config

func (ctx *NodeTestRuleContext) Config() types.Config

func (*NodeTestRuleContext) GetContext added in v0.13.0

func (ctx *NodeTestRuleContext) GetContext() context.Context

func (*NodeTestRuleContext) GetEndFunc

func (ctx *NodeTestRuleContext) GetEndFunc() func(msg types.RuleMsg, err error)

func (*NodeTestRuleContext) GetSelfId

func (ctx *NodeTestRuleContext) GetSelfId() string

func (*NodeTestRuleContext) NewMsg

func (ctx *NodeTestRuleContext) NewMsg(msgType string, metaData types.Metadata, data string) types.RuleMsg

func (*NodeTestRuleContext) SetContext added in v0.13.0

func (*NodeTestRuleContext) SetEndFunc

func (ctx *NodeTestRuleContext) SetEndFunc(onEndFunc func(msg types.RuleMsg, err error)) types.RuleContext

func (*NodeTestRuleContext) SubmitTack

func (ctx *NodeTestRuleContext) SubmitTack(task func())

func (*NodeTestRuleContext) TellFailure

func (ctx *NodeTestRuleContext) TellFailure(msg types.RuleMsg, err error)

func (*NodeTestRuleContext) TellNext

func (ctx *NodeTestRuleContext) TellNext(msg types.RuleMsg, relationTypes ...string)

func (*NodeTestRuleContext) TellSelf

func (ctx *NodeTestRuleContext) TellSelf(msg types.RuleMsg, delayMs int64)

func (*NodeTestRuleContext) TellSuccess

func (ctx *NodeTestRuleContext) TellSuccess(msg types.RuleMsg)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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