package actor import "sparrow/pkg/ruleEngine" type Msg interface { GetMessageType() MsgType } // actor message type def type MsgType string const ( QUEUE_TO_RULE_ENGINE_MSG MsgType = "QUEUE_TO_RULE_ENGINE_MSG" RULE_CHAIN_TO_RULE_MSG MsgType = "RULE_CHAIN_TO_RULE_MSG" RULE_TO_RULE_CHAIN_TELL_NEXT_MSG MsgType = "RULE_TO_RULE_CHAIN_TELL_NEXT_MSG" RULE_TO_SELF_MSG MsgType = "RULE_TO_SELF_MSG" ) type QueueToRuleEngineMsg struct { TenantId string Message *ruleEngine.Message RelationTypes []ruleEngine.RelationType FailureMessage error } func (q *QueueToRuleEngineMsg) GetMessageType() MsgType { return QUEUE_TO_RULE_ENGINE_MSG } type RuleNodeToRuleChanTellNextMsg struct { RuleNodeId string RelationTypes []ruleEngine.RelationType Message *ruleEngine.Message FailureMessage error } func (r *RuleNodeToRuleChanTellNextMsg) GetMessageType() MsgType { return RULE_TO_RULE_CHAIN_TELL_NEXT_MSG } type RuleToSelfMsg struct { Message *ruleEngine.Message } func (r *RuleToSelfMsg) GetMessageType() MsgType { return RULE_TO_SELF_MSG }