mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: document "ETCD_WATCH_*"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
6ba5682e64
commit
b8a95d7a9b
@ -395,6 +395,20 @@ Receive events and execute `echo watch event received`:
|
|||||||
# watch event received
|
# watch event received
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Watch response is set via `ETCD_WATCH_*` environmental variables:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_"
|
||||||
|
|
||||||
|
# PUT
|
||||||
|
# foo
|
||||||
|
# bar
|
||||||
|
# ETCD_WATCH_REVISION=11
|
||||||
|
# ETCD_WATCH_KEY="foo"
|
||||||
|
# ETCD_WATCH_EVENT_TYPE="PUT"
|
||||||
|
# ETCD_WATCH_VALUE="bar"
|
||||||
|
```
|
||||||
|
|
||||||
Watch with environmental variables and execute `echo watch event received`:
|
Watch with environmental variables and execute `echo watch event received`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user