Explorar el Código

watch.go: docs on WatchResponse.Canceled

Hongchao Deng hace 10 años
padre
commit
5e017e94f9
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      clientv3/watch.go

+ 3 - 1
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
 }