增加watch方法
This commit is contained in:
@ -10,6 +10,8 @@ package etcd
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"go.etcd.io/etcd/clientv3"
|
||||
)
|
||||
|
||||
// 初始化client各种默认配置
|
||||
@ -33,3 +35,6 @@ const (
|
||||
// DefaultGetTimeout get 默认超时时间
|
||||
DefaultGetTimeout = time.Second
|
||||
)
|
||||
|
||||
// WatcherHandler 监听key变化的处理函数
|
||||
type WatcherHandler func(event *clientv3.Event)
|
||||
|
Reference in New Issue
Block a user