package protocol import "fmt" // RelationType 默认节点关系 type RelationType string const ( Success RelationType = "Success" // 成功 Failure RelationType = "Failure" // 失败 Other RelationType = "Other" // 其他 True RelationType = "True" // 真 False RelationType = "False" // 假 PostAttributes RelationType = "Post attributes" // 上报属性 PostEvent RelationType = "Post Event" // 上报事件 ConnectEvent RelationType = "Connect Event" // 接入 DisconnectEvent RelationType = "Disconnect Event" // 断开 ) const ( POST_ATTRIBUTES_REQUEST = "POST_ATTRIBUTES_REQUEST" // 属性上报消息 POST_EVENT_REQUEST = "POST_EVENT_REQUEST" // 事件上报消息 CONNECT_EVENT = "CONNECT_EVENT" // 接入事件 DISCONNECT_EVENT = "DISCONNECT_EVENT" // 断开事件 ) // RuleNodeInfo rule node info for output type RuleNodeInfo struct { ruleNodeId string ruleChainName string ruleNodeName string } func (r *RuleNodeInfo) String() string { return fmt.Sprintf("[RuleChain:%s|RuleNode:%s|RuleNodeId:%s]", r.ruleChainName, r.ruleNodeName, r.ruleNodeId) } type RuleNodeRelation struct { In string Out string RelationType RelationType }