添加注释

This commit is contained in:
Yun
2025-09-24 17:29:11 +08:00
parent 85d041753e
commit 84569dc290
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ import (
// 心跳 // 心跳
// 作用:上报实例存活状态 // 作用:上报实例存活状态
// 依赖:leader priority
type HeartBeat struct { type HeartBeat struct {
ctx context.Context ctx context.Context
+4
View File
@@ -14,6 +14,10 @@ import (
"github.com/yuninks/timerx/priority" "github.com/yuninks/timerx/priority"
) )
// 领导
// 作用:领导选举,是领导才执行,避免资源浪费
// 依赖:priority
type Leader struct { type Leader struct {
ctx context.Context ctx context.Context
cancel context.CancelFunc cancel context.CancelFunc