mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: document watch with ETCDCTL_WATCH_*
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
7e2759da8d
commit
d37afffb98
@ -378,6 +378,13 @@ watch [options] <key or prefix>\n
|
||||
# bar
|
||||
```
|
||||
|
||||
```bash
|
||||
ETCDCTL_WATCH_KEY=foo ./etcdctl watch
|
||||
# PUT
|
||||
# foo
|
||||
# bar
|
||||
```
|
||||
|
||||
Receive events and execute `echo watch event received`:
|
||||
|
||||
```bash
|
||||
@ -388,6 +395,27 @@ Receive events and execute `echo watch event received`:
|
||||
# watch event received
|
||||
```
|
||||
|
||||
Watch with environmental variables and execute `echo watch event received`:
|
||||
|
||||
```bash
|
||||
export ETCDCTL_WATCH_KEY=foo
|
||||
./etcdctl watch -- echo watch event received
|
||||
# PUT
|
||||
# foo
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
```bash
|
||||
export ETCDCTL_WATCH_KEY=foo
|
||||
export ETCDCTL_WATCH_RANGE_END=foox
|
||||
./etcdctl watch -- echo watch event received
|
||||
# PUT
|
||||
# fob
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
##### Interactive
|
||||
|
||||
```bash
|
||||
@ -413,6 +441,29 @@ watch foo -- echo watch event received
|
||||
# watch event received
|
||||
```
|
||||
|
||||
Watch with environmental variables and execute `echo watch event received`:
|
||||
|
||||
```bash
|
||||
export ETCDCTL_WATCH_KEY=foo
|
||||
./etcdctl watch -i
|
||||
watch -- echo watch event received
|
||||
# PUT
|
||||
# foo
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
```bash
|
||||
export ETCDCTL_WATCH_KEY=foo
|
||||
export ETCDCTL_WATCH_RANGE_END=foox
|
||||
./etcdctl watch -i
|
||||
watch -- echo watch event received
|
||||
# PUT
|
||||
# fob
|
||||
# bar
|
||||
# watch event received
|
||||
```
|
||||
|
||||
### LEASE \<subcommand\>
|
||||
|
||||
LEASE provides commands for key lease management.
|
||||
|
Loading…
x
Reference in New Issue
Block a user