feat: 升级接口约束以及定义
This commit is contained in:
22
abstract/IDelayQueue.go
Normal file
22
abstract/IDelayQueue.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Package abstract ...
|
||||
//
|
||||
// Description : abstract ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-08-29 12:08
|
||||
package abstract
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/queue/define"
|
||||
redisPkgDefine "git.zhangdeman.cn/zhangdeman/redis/define"
|
||||
)
|
||||
|
||||
// IDelayQueue 延迟队列接口约束
|
||||
type IDelayQueue interface {
|
||||
Send(ctx context.Context, delayTime int64, data *define.EventData) *redisPkgDefine.RedisResult // 生产事件
|
||||
Distribute(ctx context.Context) // 时间到期分发
|
||||
Stop() // 停止延迟队列
|
||||
}
|
||||
Reference in New Issue
Block a user