mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #8106 from heyitsanthony/clarify-watch-comment
clientv3: clarify Watch close conditions
This commit is contained in:
commit
1f206c027a
@ -40,10 +40,9 @@ type WatchChan <-chan WatchResponse
|
|||||||
|
|
||||||
type Watcher interface {
|
type Watcher interface {
|
||||||
// Watch watches on a key or prefix. The watched events will be returned
|
// Watch watches on a key or prefix. The watched events will be returned
|
||||||
// through the returned channel.
|
// through the returned channel. If revisions waiting to be sent over the
|
||||||
// If the watch is slow or the required rev is compacted, the watch request
|
// watch are compacted, then the watch will be canceled by the server, the
|
||||||
// might be canceled from the server-side and the chan will be closed.
|
// client will post a compacted error watch response, and the channel will close.
|
||||||
// 'opts' can be: 'WithRev' and/or 'WithPrefix'.
|
|
||||||
Watch(ctx context.Context, key string, opts ...OpOption) WatchChan
|
Watch(ctx context.Context, key string, opts ...OpOption) WatchChan
|
||||||
|
|
||||||
// Close closes the watcher and cancels all watch requests.
|
// Close closes the watcher and cancels all watch requests.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user