Skip to content

Commit

Permalink
etcdctl: document "ETCD_WATCH_*"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Jan 17, 2018
1 parent 6ba5682 commit b8a95d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions etcdctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,20 @@ Receive events and execute `echo 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`:

```bash
Expand Down

0 comments on commit b8a95d7

Please sign in to comment.