Xiang Li 535064924c etcdctlv3: make PUT command clean and documented před 10 roky
..
command 535064924c etcdctlv3: make PUT command clean and documented před 10 roky
README.md 535064924c etcdctlv3: make PUT command clean and documented před 10 roky
help.go b7647e0b55 etcdctlv3: use spf13/cobra for cli interface před 10 roky
main.go f71e733b8e etcdctlv3: add mirrormaker před 10 roky

README.md

etcdctl

Commands

PUT [options] <key> <value>

PUT assigns the specified value with the specified key. If key already holds a value, it is overwritten.

Options

  • lease -- lease ID (in hexadecimal) to attach to the key.

Return value

Simple reply

  • OK if PUT executed correctly. Exit code is zero.

  • Error string if PUT failed. Exit code is non-zero.

TODO: probably json and binary encoded proto

Examples

./etcdctl PUT foo bar --lease=0x1234abcd
OK
./etcdctl range foo
bar

Notes

If <value> isn't given as command line argument, this command tries to read the value from standard input.

When <value> begins with '-', <value> is interpreted as a flag. Insert '--' for workaround:

./etcdctl put <key> -- <value>
./etcdctl put -- <key> <value>