增加处理结果定义 + 增加无需发送事件的回调
This commit is contained in:
@ -60,10 +60,10 @@ type IPreSendHandler interface {
|
||||
// Date : 14:16 2023/2/1
|
||||
GetEventData() interface{}
|
||||
|
||||
// NeedSend 判断是否需要发送事件
|
||||
// NeedSend 判断是否需要发送事件, 若不需要发送, 可在第一个返回值中记录不需要发送的原因
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:24 2023/2/2
|
||||
NeedSend() bool
|
||||
NeedSend() (map[string]interface{}, bool)
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
// Date : 2023-02-01 14:21
|
||||
package abstract
|
||||
|
||||
import "git.zhangdeman.cn/zhangdeman/event"
|
||||
|
||||
// ISendEventHandler 发送事件处理器
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
@ -35,4 +37,11 @@ type ISendEventHandler interface {
|
||||
//
|
||||
// Date : 14:22 2023/2/1
|
||||
FailCallback(data map[string]interface{}, err error)
|
||||
|
||||
// NoSendCallback 不需要发送事件的回调
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:26 2023/2/2
|
||||
NoSendCallback(data interface{}, res event.SendResult)
|
||||
}
|
||||
|
Reference in New Issue
Block a user