package ruleEngine

import (
	"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 Ref       // 规则链 actor
	SelfActor  Ref       // 当前节点的 actor
	Self       *RuleNode // 当前节点
}

// RuleNodeRelation 节点关系
type RuleNodeRelation struct {
	In   entities.EntityId
	Out  entities.EntityId
	Type string
}
