node.go 379 B

123456789101112131415
  1. package ruleEngine
  2. import "sparrow/pkg/actor"
  3. type Node interface {
  4. Init(ctx Context, config string) error
  5. OnMessage(ctx Context, message *Message) error
  6. }
  7. // RuleNodeCtx 节点上下文
  8. type RuleNodeCtx struct {
  9. TenantId string // 租户Id
  10. chainActor actor.Ref // 规则链 actor
  11. selfActor actor.Ref // 当前节点的 actor
  12. self *RuleNode // 当前节点
  13. }