From 5e017e94f95b49d3f6dea209dd90781ddf804f88 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Fri, 4 Mar 2016 15:03:03 -0800 Subject: [PATCH] watch.go: docs on WatchResponse.Canceled --- clientv3/watch.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clientv3/watch.go b/clientv3/watch.go index eba5d2a0d..8a3ea85d5 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -46,7 +46,9 @@ type WatchResponse struct { // CompactRevision is the minimum revision the watcher may receive. CompactRevision int64 - // Canceled is set to indicate the channel is about to close. + // Canceled is used to indicate watch failure. + // If the watch failed and the stream was about to close, before the channel is closed, + // the channel sends a final response that has Canceled set to true with a non-nil Err(). Canceled bool }