Documentation ¶
Index ¶
- func NewRuleContext(config types.Config, callback func(msg types.RuleMsg, relationType string)) types.RuleContext
- type NodeTestRuleContext
- func (ctx *NodeTestRuleContext) Config() types.Config
- func (ctx *NodeTestRuleContext) GetContext() context.Context
- func (ctx *NodeTestRuleContext) GetEndFunc() func(msg types.RuleMsg, err error)
- func (ctx *NodeTestRuleContext) GetSelfId() string
- func (ctx *NodeTestRuleContext) NewMsg(msgType string, metaData types.Metadata, data string) types.RuleMsg
- func (ctx *NodeTestRuleContext) SetContext(c context.Context) types.RuleContext
- func (ctx *NodeTestRuleContext) SetEndFunc(onEndFunc func(msg types.RuleMsg, err error)) types.RuleContext
- func (ctx *NodeTestRuleContext) SubmitTack(task func())
- func (ctx *NodeTestRuleContext) TellFailure(msg types.RuleMsg, err error)
- func (ctx *NodeTestRuleContext) TellNext(msg types.RuleMsg, relationTypes ...string)
- func (ctx *NodeTestRuleContext) TellSelf(msg types.RuleMsg, delayMs int64)
- func (ctx *NodeTestRuleContext) TellSuccess(msg types.RuleMsg)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRuleContext ¶
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 ¶
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) SetContext ¶
func (ctx *NodeTestRuleContext) SetContext(c context.Context) types.RuleContext
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)
Click to show internal directories.
Click to hide internal directories.