mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctlv3: minor updates to put and make-mirror command
This commit is contained in:
parent
150576fa72
commit
dcfbcb7a68
@ -32,6 +32,8 @@ PUT assigns the specified value with the specified key. If key already holds a v
|
|||||||
|
|
||||||
- lease -- lease ID (in hexadecimal) to attach to the key.
|
- lease -- lease ID (in hexadecimal) to attach to the key.
|
||||||
|
|
||||||
|
- prev-kv -- return the previous key-value pair before modification.
|
||||||
|
|
||||||
#### Return value
|
#### Return value
|
||||||
|
|
||||||
##### Simple reply
|
##### Simple reply
|
||||||
@ -58,6 +60,16 @@ The protobuf encoding of the PUT [RPC response][etcdrpc].
|
|||||||
# bar
|
# bar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./etcdctl put foo bar1 --prev-kv
|
||||||
|
# OK
|
||||||
|
# foo
|
||||||
|
# bar
|
||||||
|
./etcdctl get foo
|
||||||
|
# foo
|
||||||
|
# bar1
|
||||||
|
```
|
||||||
|
|
||||||
#### Notes
|
#### Notes
|
||||||
|
|
||||||
If \<value\> isn't given as command line argument, this command tries to read the value from standard input.
|
If \<value\> isn't given as command line argument, this command tries to read the value from standard input.
|
||||||
@ -690,7 +702,6 @@ Whenever a leader is elected, its proposal is given as output.
|
|||||||
./etcdctl elect myelection foo
|
./etcdctl elect myelection foo
|
||||||
# myelection/1456952310051373265
|
# myelection/1456952310051373265
|
||||||
# foo
|
# foo
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Notes
|
#### Notes
|
||||||
@ -761,6 +772,8 @@ the database, the etcd member releases this free space back to the file system.
|
|||||||
|
|
||||||
- no-dest-prefix -- Mirror key-values to the root of the destination cluster
|
- no-dest-prefix -- Mirror key-values to the root of the destination cluster
|
||||||
|
|
||||||
|
- dest-insecure-transport -- Disable transport security for client connections
|
||||||
|
|
||||||
#### Return value
|
#### Return value
|
||||||
|
|
||||||
Simple reply
|
Simple reply
|
||||||
|
@ -50,7 +50,7 @@ will store the content of the file to <key>.
|
|||||||
Run: putCommandFunc,
|
Run: putCommandFunc,
|
||||||
}
|
}
|
||||||
cmd.Flags().StringVar(&leaseStr, "lease", "0", "lease ID (in hexadecimal) to attach to the key")
|
cmd.Flags().StringVar(&leaseStr, "lease", "0", "lease ID (in hexadecimal) to attach to the key")
|
||||||
cmd.Flags().BoolVar(&putPrevKV, "prev-kv", false, "return changed key-value pairs")
|
cmd.Flags().BoolVar(&putPrevKV, "prev-kv", false, "return the previous key-value pair before modification")
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user