Skip to content

Commit

Permalink
Merge pull request #8106 from heyitsanthony/clarify-watch-comment
Browse files Browse the repository at this point in the history
clientv3: clarify Watch close conditions
  • Loading branch information
Anthony Romano committed Jun 15, 2017
2 parents 3a37b68 + 13d9438 commit 1f206c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clientv3/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ type WatchChan <-chan WatchResponse

type Watcher interface {
// Watch watches on a key or prefix. The watched events will be returned
// through the returned channel.
// If the watch is slow or the required rev is compacted, the watch request
// might be canceled from the server-side and the chan will be closed.
// 'opts' can be: 'WithRev' and/or 'WithPrefix'.
// through the returned channel. If revisions waiting to be sent over the
// watch are compacted, then the watch will be canceled by the server, the
// client will post a compacted error watch response, and the channel will close.
Watch(ctx context.Context, key string, opts ...OpOption) WatchChan

// Close closes the watcher and cancels all watch requests.
Expand Down

0 comments on commit 1f206c0

Please sign in to comment.