consul-kv

command module
v0.0.0-...-015e3d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2016 License: MIT Imports: 4 Imported by: 0

README

consul-kv

Backup, restore, and set kvs from consul.

Usage

consul-kv set <consul address> <key> <value>

Set key to value at given consul address.

consul-kv backup

Backup kvs from consul.

Options
  • --from <value>, -f <value> (default 'localhost:8500') - consul address to retrieve keys from.
  • --name <value>, -n <value> (default 'data.json') - filename to save kvs to.
  • --prefix <value>, -p <value> - prefix to pull keys with. If not supplied, gets all keys.
consul-kv restore

Restore kvs to consul, from either JSON or a different consul.

Options
  • --from <value>, -f <value> (default 'localhost:8500') - consul address to retrieve keys from.
  • --name <value>, -n <value> (default 'data.json') - filename to retrieve keys from. Takes priority over --from.
  • --to <value>, -t <value> (default 'localhost:8500') - filename to restore keys to.
  • --prefix <value>, -p <value> - prefix to restore keys with. If not supplied, restores all keys.

restore keys

Dependencies

Golang 1.7

Install

To install, use go get:

$ go get -d github.com/tehleach/consul-kv

Alternatively, if you don't have golang set up on your machine, you can just use the binary in the release directory. Make sure to use the correct one for your OS.

Testing

$ go test ./...

Author

Kyle Leach

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL