This commit is contained in:
白茶清欢 2021-11-26 15:56:30 +08:00
parent 628eac60b4
commit 34c9f035ee

View File

@ -29,7 +29,7 @@ func WatchKeyWithOption(ctx context.Context, watchKey string, callbackFunc Watch
ctx = context.Background() ctx = context.Background()
} }
rch := Client.Watch(ctx, watchKey) // <-chan WatchResponse rch := Client.Watch(ctx, watchKey, optionList...) // <-chan WatchResponse
for watchResp := range rch { for watchResp := range rch {
for _, ev := range watchResp.Events { for _, ev := range watchResp.Events {
callbackFunc(ev) callbackFunc(ev)