增加监听一次key变化的处理

This commit is contained in:
2021-11-23 16:55:05 +08:00
parent ada41fa40a
commit 0b5e55cefd
3 changed files with 86 additions and 0 deletions

View File

@ -41,3 +41,6 @@ type WatcherHandler func(event *clientv3.Event)
// CancelWatcherHandler 取消监听后的处理函数
type CancelWatcherHandler func(key string, data interface{})
// TimeoutWatcherHandler 超时之后的回调函数
type TimeoutWatcherHandler func(key string, timeout time.Duration)