123456789101112131415161718192021222324252627 |
- package ruleEngine
- import (
- "sparrow/pkg/actor"
- "sparrow/pkg/entities"
- "sparrow/pkg/protocol"
- )
- type Node interface {
- Init(ctx Context, config string) error
- OnMessage(ctx Context, message *protocol.Message) error
- }
- // RuleNodeCtx 节点上下文
- type RuleNodeCtx struct {
- TenantId string // 租户Id
- ChainActor actor.Ref // 规则链 actor
- SelfActor actor.Ref // 当前节点的 actor
- Self *RuleNode // 当前节点
- }
- // RuleNodeRelation 节点关系
- type RuleNodeRelation struct {
- In entities.EntityId
- Out entities.EntityId
- Type string
- }
|