Merge pull request #4689 from hongchaodeng/master

watch.go: docs on WatchResponse.Canceled
release-2.3
Xiang Li 2016-03-04 16:09:16 -08:00
commit e708bc14d7
1 changed files with 3 additions and 1 deletions

View File

@ -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
}