mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: document watch exec in v3
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
904513fa5c
commit
e89fc20542
@ -337,7 +337,7 @@ Prints the compacted revision.
|
||||
# compacted revision 1234
|
||||
```
|
||||
|
||||
### WATCH [options] [key or prefix] [range_end]
|
||||
### WATCH [options] [key or prefix] [range_end] [--] [exec-command arg1 arg2 ...]
|
||||
|
||||
Watch watches events stream on keys or prefixes, [key or prefix, range_end) if `range-end` is given. The watch command runs until it encounters an error or is terminated by the user. If range_end is given, it must be lexicographically greater than key or "\x00".
|
||||
|
||||
@ -378,6 +378,16 @@ watch [options] <key or prefix>\n
|
||||
# bar
|
||||
```
|
||||
|
||||
Receive events and execute `echo watch event received`:
|
||||
|
||||
```bash
|
||||
./etcdctl watch foo -- echo watch event received
|
||||
# PUT
|
||||
# foo
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
##### Interactive
|
||||
|
||||
```bash
|
||||
@ -392,6 +402,17 @@ watch foo
|
||||
# bar
|
||||
```
|
||||
|
||||
Receive events and execute `echo watch event received`:
|
||||
|
||||
```bash
|
||||
./etcdctl watch -i
|
||||
watch foo -- echo watch event received
|
||||
# PUT
|
||||
# foo
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
### LEASE \<subcommand\>
|
||||
|
||||
LEASE provides commands for key lease management.
|
||||
|
Loading…
x
Reference in New Issue
Block a user