增加唯一执行的参数

This commit is contained in:
ayflying
2025-08-22 12:04:26 +08:00
parent f1c22dc9e6
commit 30d30bb8c6
4 changed files with 14 additions and 8 deletions

View File

@@ -7,9 +7,6 @@ package service
type (
IIp2Region interface {
// Load 加载到内存中
//
// @Description: 加载ip2region数据库到内存中。
// @receiver s *sIp2region: sIp2region的实例。
Load()
GetIp(ip string) (res []string)

View File

@@ -38,7 +38,8 @@ type (
// @receiver s: sSystemCron的实例代表一个调度系统。
// @param typ: 任务的类型,决定该任务将被添加到哪个列表中。对应不同的时间间隔。
// @param _func: 要添加的任务函数该函数执行时应该返回一个error。
AddCronV2(typ v1.CronType, _func func(context.Context) error)
// @param unique: 是否只在唯一服务器上执行
AddCronV2(typ v1.CronType, _func func(context.Context) error, unique ...bool)
// StartCron 开始计划任务执行
//
// @Description: