Merge pull request #9115 from gyuho/doc-watch

clientv3: document possible memory pile-up in Watch
This commit is contained in:
Sahdev Zala 2018-01-11 18:12:13 -05:00 committed by GitHub
commit e16abdfade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,8 @@ type Watcher interface {
// client will post a compacted error watch response, and the channel will close.
// If the context "ctx" is canceled or timed out, returned "WatchChan" is closed,
// and "WatchResponse" from this closed channel has zero events and nil "Err()".
// The context "ctx" MUST be canceled, as soon as watcher is no longer being used,
// to release the associated resources.
// If the context is "context.Background/TODO", returned "WatchChan" will not be closed
// and wait until events happen, except when server returns a non-recoverable error.
// For example, when context passed with "WithRequireLeader" and the connected server