优化传参

This commit is contained in:
Yun
2024-05-31 13:05:51 +08:00
parent ec41fd80a8
commit 3719c417fb
4 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
)
type timerStr struct {
Callback callback // 需要回调的方法
Callback func(ctx context.Context, extendData interface{}) error // 需要回调的方法
CanRunning chan (struct{}) // 是否允许执行(only single)
TaskId string // 任务ID 全局唯一键(only cluster)
ExtendData interface{} // 附加参数
@@ -40,4 +40,4 @@ type JobData struct {
}
// 定义各个回调函数
type callback func(ctx context.Context, extendData interface{}) error
// type callback func(ctx context.Context, extendData interface{}) error