Readonlyidid is the watcher's ID in etcd. This is null initially and during
reconnections, only populated while the watcher is idle.
ReadonlyrequestCancels the watcher.
lastRevision returns the lossless bigint latest/resume revision for this
watcher. After observing a cluster header at revision N, this is
N + 1. This will be null until the watcher has a resume revision.
connecting is fired when we send a request to etcd to queue this watcher.
connected is fired after etcd acknowledges the watcher is connected.
When this event is fired, id will already be populated.
data is fired when etcd reports an update on one of the keys being watched.
end is fired after the watcher is closed normally. Like Node.js streams,
end is NOT fired if error is fired.
disconnected is fired if the watcher is disconnected from etcd. The
watcher will automatically attempt to reconnect when this occurs. When
this event is fired, id will still be populated if it was previously.
error is fired if a non-recoverable error occurs that prevents the watcher
from functioning. This generally occurs if etcd unexpectedly canceled our
lease, which can occur if (for example) we don't have permission to read
the watched key or range. When this event is fired, id will still be
populated if it was previously.
The Watcher is an event emitter that handles watching on a key or set of keys. See WatchBuilder for a usage example.