mirror of
https://github.com/go-kratos/kratos.git
synced 2025-02-15 13:53:35 +02:00
feat(contrib):add etcd watcher withKeysOnly option (#2146)
Co-authored-by: 刘易 <liuyi08@bilibili.com>
This commit is contained in:
parent
9015ffb920
commit
52031f1381
@ -29,7 +29,7 @@ func newWatcher(ctx context.Context, key, name string, client *clientv3.Client)
|
||||
serviceName: name,
|
||||
}
|
||||
w.ctx, w.cancel = context.WithCancel(ctx)
|
||||
w.watchChan = w.watcher.Watch(w.ctx, key, clientv3.WithPrefix(), clientv3.WithRev(0))
|
||||
w.watchChan = w.watcher.Watch(w.ctx, key, clientv3.WithPrefix(), clientv3.WithRev(0), clientv3.WithKeysOnly())
|
||||
err := w.watcher.RequestProgress(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user