添加注释
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
|||||||
|
|
||||||
// 心跳
|
// 心跳
|
||||||
// 作用:上报实例存活状态
|
// 作用:上报实例存活状态
|
||||||
|
// 依赖:leader priority
|
||||||
|
|
||||||
type HeartBeat struct {
|
type HeartBeat struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user